This is really strange. I can't seem to sort items in the Media section. When I right click the folder and choose sort, then sort the items and click ok, it appears to have no effect at all. The only thing I noticed was that now multiple items have a "Sort Order" value of "0". I tried to correct this manually in the database under the cmsContentXml table, but that had no visible effect either. I'm running version 4.5.1. Has anyone else run into this?
Yes, I can confirm this issue. I created 2 new media items in an empty Umbraco 4.5.1 install, when I called sort the first time they had the Sort order values 36 and 37. After the first switch of the items the first one had 0 as sort order and the second one 36. After the second switch both were at 0. After this changing the position had no effect anymore. Looks like the sort order values get messed up when changing the order as Michael has suspected.
I think there was a similar problem in earlier versions of Umbraco (4.0.x) where after you had sorted a media folder the @sortOrder paramater was not updated. If found as a work around to go into one of the media items after sorting and just re-save it and this seemed to sort everything out. It might be worth testing if this work-around has a similar effect for your problem with 4.5.1.
I can also confirm this behaviour, i.e sorting of media items not working properly Sort some media items under a given folder once, and the items are sorted, try to sort them again and you'll recieve an error in your umbraco debug log like:
System.ArgumentException: No Document exists with Version '59a72fc2-9f37-43d7-865f-da6e8e4c93c0' at umbraco.cms.businesslogic.web.Document.setupNode() at umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) at umbraco.cms.businesslogic.Content..ctor(Int32 id) at umbraco.cms.businesslogic.web.Document..ctor(Int32 id) at umbraco.presentation.webservices.nodeSorter.UpdateSortOrder(Int32 ParentId, String SortOrder)
yep, upgrade to 4.5.2 and it will work... if you're already on 4.5.1 you should be able to upgrade by downloading the latest binary release for your version (.net 4 or .net 3.5) and copying over the latest bin, umbraco, umbraco_client and install directory. Make sure you back everything up first just in case though.
I am sorry but still have problems in 4.5.2 I got a folder where I have 20 to 30 image files in it. Trying to sort it and everything seems working fine. When I used the sort option from the right click menu everything seemed fine. I can see photos sorted in backend while in front end the problem is still there. Actually I am using this peace of code in xslt
When I use the xmlDump package in the front end to print out the whole xml data I see the sort order is wrong and actually is nothing to do with the back end order.
Any ideas? I need my photos ordered correctly as it's for a photo gallery :-)
Can't sort items in the Media section
This is really strange. I can't seem to sort items in the Media section. When I right click the folder and choose sort, then sort the items and click ok, it appears to have no effect at all. The only thing I noticed was that now multiple items have a "Sort Order" value of "0". I tried to correct this manually in the database under the cmsContentXml table, but that had no visible effect either. I'm running version 4.5.1. Has anyone else run into this?
Yes, I can confirm this issue. I created 2 new media items in an empty Umbraco 4.5.1 install, when I called sort the first time they had the Sort order values 36 and 37. After the first switch of the items the first one had 0 as sort order and the second one 36. After the second switch both were at 0. After this changing the position had no effect anymore. Looks like the sort order values get messed up when changing the order as Michael has suspected.
Ok, that's a slight relief. I'm glad it's not something I've done personally. I'll add the issue to the codeplex issue tracker. Thanks Sascha!
Hi,
I think there was a similar problem in earlier versions of Umbraco (4.0.x) where after you had sorted a media folder the @sortOrder paramater was not updated. If found as a work around to go into one of the media items after sorting and just re-save it and this seemed to sort everything out. It might be worth testing if this work-around has a similar effect for your problem with 4.5.1.
Yeah I tried that. No luck. Thanks though.
I can also confirm this behaviour, i.e sorting of media items not working properly
Sort some media items under a given folder once, and the items are sorted, try to sort them again and you'll recieve an error in your umbraco debug log like:
System.ArgumentException: No Document exists with Version '59a72fc2-9f37-43d7-865f-da6e8e4c93c0' at umbraco.cms.businesslogic.web.Document.setupNode() at umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) at umbraco.cms.businesslogic.Content..ctor(Int32 id) at umbraco.cms.businesslogic.web.Document..ctor(Int32 id) at umbraco.presentation.webservices.nodeSorter.UpdateSortOrder(Int32 ParentId, String SortOrder)
Please vote this bug up on codeplex:
http://umbraco.codeplex.com/workitem/28511?PendingVoteId=28511
CodePlex shows this issue as fixed and closed. How do I get the fix? Is it rolled up into the latest update?
yep, upgrade to 4.5.2 and it will work...
if you're already on 4.5.1 you should be able to upgrade by downloading the latest binary release for your version (.net 4 or .net 3.5) and copying over the latest bin, umbraco, umbraco_client and install directory. Make sure you back everything up first just in case though.
- Tim
Just installed 4.5.2 and confirmed, it does correct the sorting issue.
Hello to eveyone,
I am sorry but still have problems in 4.5.2
I got a folder where I have 20 to 30 image files in it. Trying to sort it and everything seems working fine. When I used the sort option from the right click menu everything seemed fine. I can see photos sorted in backend while in front end the problem is still there. Actually I am using this peace of code in xslt
<xsl:for-each select="umbraco.library:GetMedia($mediaNodeID, '1')/Image">
<xsl:sort select="@sortOrder" data-type="number" case-order="lower-first" />
</xsl:for-each>
When I use the xmlDump package in the front end to print out the whole xml data I see the sort order is wrong and actually is nothing to do with the back end order.
Any ideas? I need my photos ordered correctly as it's for a photo gallery :-)
Cheer and happy 2011 to everyone
Giorgos
is working on a reply...