Plone NavTreePortlet Sortorder Problem and Workaround
Having problems with objects not appearing in the right sort order in your Plone NavTreePortlet? I had that problem on a Plone 2.0.5 with LinguaPlone, which gives me the "new style" navigation portlet. Sometimes, especially after changing the id of an object, that object would just "fall down" to the end of the list, no matter where it was sorted in inside the folder_contents list. Read on for a workaround...
The same thing happened after we added and sorted in a lot of folders. They got out of order. It turns out, what happens is that the Catalog is getting messed up. So there is a workaround: When this happens, go into the ZMI, locate the root of your portal, open the "portal_catalog" object there. Hit the "Indexes" tab. Check the "getFolderOrder" and click on "Reindex". This takes only an instant. It rebuilds the index of the order that folders are in.
I think newer versions of Plone will have code to do this automatically after reordering operations. And if you dig deep enough you might discover this anyway. But still this workaround might be handy if you happen to mess with folder id's in the ZMI, and for other problems it might give you a hint where to look.