Controlling order of assets in asset listing

Hi,


I am using version 3.2.2.



I'm trying to control the order of assets in an asset listing by moving them around in the asset map, and chosing "No sort" on the asset listing details screen.



No matter what I do, that assets come up in the order they were created.



Is this the correct behaviour for the "No sort" option? Is there something else I should be doing to get this to work?

Is this the same problem as is discussed here? I feel like I’m going a bit crazy here, but I thought an earlier version of Matrix sorted assets in an asset listing based on the order in the asset map when no sort was selected (or am I just imagining things)?

The "no sort" option is truly no sorting – the assets are displayed in the order they're returned from the database, which is usually in asset id order, though not always (for reasons I've yet to fathom). A good feature request would be an "Asset Map" sort option.

As suggested, I've put it in the Bug Tracker (as a feature request). It seems strange to me that it sorts by asset ID by default (on a good day), given sorting by ID is one of the sort options…

It doesn't actively sort by asset ID when set to No Sort, it doesn't sort at all. It just uses the order returned by the database engine. Because assets are (usually) in primary key order within the database table and because the asset id is (usually) the primary key, they are returned (usually) in that order when no sort option is provided.

Just had a quick look at the code and if you have sort by set to "No Sort" there are two paths:

  • If you have subs only set to true then it should be returning using the sort order on the links (i.e. the order in the asset map).


  • If you have subs only set to false, then no sorting is done and it will basically depend on the database indexing (which is why the order could change to no appparent reason).

It looks like that works - it makes a bit more sense, I guess. Thanks for that.

I'm tearing my hair out over this.


Selecting "subs only" and "no sort" in an asset listing used to sort assets in an asset listing by asset map order (I think).



I'm using that setting on one of my asset listings, which lists PDFs, Files, Standad pages and Redirects, but they are not coming up in the same order as the asset map.



It doesn't seem to matter what I do, they seem to come up in some random order. Moving assets in the asset map has an effect on the order in the asset listing, but it's still doesn't directly correlate to the asset map order. No matter where I put the one Redirect asset in amongst the others, it gets listed out of order.



What am I doing wrong?

I havnt had a look at the code yet, but from what I can remember, selecting "no sort" doesnt do any sorting on the resturned results and you are not guaranteed to get the asset back in any order.


You shouldnt rely on the ordering of the "no sort" option in any case because the functionality may change without warning because the asset listing does nothing to sort the list and relies on other defaults that may be changed.

Hi… it seems to contradict the way that Blair indicated it worked.


Some way of consistently sorting assets in a manually controlled way is a pretty fundamental requirement. To only have the option to use a system generated order is not enough.



I shouldn't have to use asset naming conventions, or fiddle with system dates to get things to go in the right order. Asset name is generally not an option - the names of files tend not to be the same as their Titles (which is what we display in the listing), so some kind of alpha-numeric sorting based on Matrix fields won't cut it.



I don't think I'd be alone in thinking that no sort would make the assets come up in the order they appear in the asset map. I think it's a pretty basic expected behaviour.



So… what are my options for sorting in an order that I select, rather than by ID, name or date?

My thought would be to add an "Asset Map Order" as a sort option for the asset listing, which then uses the map sort order specifically. This could either be funded development, or just added to the Bug Tracker as a feature request.

Avi is correct. Your problem here is that the functionality you want doesnt exist.

Hi there,


This problem is still driving our publishers nuts! It’s particularly frustrating as they all expect asset listings to sort by asset map order as default behaviour, especially when there are no system-defined sort orders set on the Asset Sorting screen.



Some way to guarantee sort by asset map order, whether it’s a sort option on the Asset Sorting screen, or the default behaviour, either way would be good.



I’ve put a feature request on the bug tracker (no. 797) in the past, but it’s been closed. I’m not sure why the bug tracker entries for this problem (and there are a handful of them now feature request on the bug tracker (no. 797)), keep getting closed with no real resolution. The reason given is generally that the problem can not be replicated, but I can absolutely guarantee it’s still happening. :huh:

If you are listing "direct links only" and set sorting to "no sort", the list will sort by asset map order. I believe this has been confirmed working since 3.6 at least.


The bugs were closed because the developers couldn't replicate the problem. If you think your system has a specific problem, I'd suggest getting in contact with your account manager so we can take a look at your system directly.