Quote from: OpenGeek at Nov 25, 2008, 04:17 PM
Sounds like some kind of replace statement is setting the primary keys specifically which can mess up the natural order of the records. Is a resolver doing something with these records or are these being inserted as related objects?
Simply sorting by snippet id would be the solution; should be a simple fix to the tree, but obviously won’t help when you browse the database in phpMyAdmin (or whatever). For a permanent fix to the table you would need to go to the operations tab in phpMyAdmin and reorder the rows by the id column.
I don’t care about the DB, just the order they appear in the tree. Having the Manager sort the tree by element ID within each category would make me a happy camper and would let others control the order of appearance of their elements.
I am adding the snippets to a category (in the same order they are created) with a related object operation, but I don’t think that’s doing it.
A PHP resolver that runs at the end of the install is setting properties on the SPForm snippet. I added code to just get and save the SPFResponse snippet after that, which moved it down in the DB, but that isn’t working any more.
A little reading on MySQL suggests that the natural order is undetermined (which explains why they kept moving around on me), so sorting the items for the tree seems like the only reliable solution.