Record Sorting & Spontaneous Re-ordering

5 posts by 2 authors in: Forums > CMS Builder
Last Post: June 15, 2015   (RSS)

By In-House-Logic - June 10, 2015 - edited: June 11, 2015

We have a smart, long-time client with a CMS Builder editor housing around 1300 records, about 1000 of which are visible to the public. They are arranged using a manual DragSortOrder but he does use the "Insert Record Here" plug-in.

He has been concerned for some time that the items in this list seem to spontaneously change their order. Some items remain fine for ages, while other groups seem to rearrange themselves all of  a sudden. This has an effect on the public-facing pages also.

The table order is set to DragSortOrder DESC. Removing the DESC does trigger an auto-reorder and greatly affects the order of the items in the table.

Q: What effect should DESC have on this sorting method? I would not have expected it to do anything.

Q: Would removing (and manually resorting the entries) have any impact on his concerns?

Q: Has spontaneous re-sorting been reported anywhere before?

Also, I noted that on the public-facing pages, the main display of these records uses no sorting parameter in the query. Meanwhile, the search result page which shows a subset of the same data uses the dragSortOrder DESC in the query. He's not complained about their display.

EDIT:  The client describes the behaviour as:

Sometimes many items in a set get out of whack. Other times the jump as a block. Other times still, a bunch will jump far away (like 10+ slots).

Any suggestions would be greatly appreciated.

Jayme

Hi Dave,

Thanks for the explanation of how this works. I always assumed that the order was more a simple index like what Joomla!/Mambo used to use. But the timestamp makes a lot of sense.

In answer to your questions:

1 - Yes, they are using both the createRecordHere.php plugin as well as the saveAndCopy.php/.js.php plugin. Plus there's a listRefreshFix.php which I've not noticed before.

2 - The server script versions are: PHP Version  PHP v5.3.29 -    Database Server  MySQL v5.5.3231.0 (Max Connections: 500)

3 - I've added the debug code to the plugin and it's now showing the current and proposed sort order. Not sure what you may need me to report beyond that. The current sort order is generally in DESC order from the samples I've looked at.

Looking forward to sorting this. It's become a serious issue for this client.

Jayme

By Dave - June 12, 2015

Hi Jayme, 

I'd recommend you ask the client to keep an eye on the "current sort order value", specifically look for when it has the same value as a record above or below (this might happen after using save & copy) .

Hopefully they'll notice a pattern and you'll be able to identify the plugin or process that is leading to the problem (which I suspect is identical sort orders on multiple records).

Let me know what they find, or if they see reordering for another reason.  We need to recreate it or get a sense of how it's happening to address it.

Dave Edis - Senior Developer
interactivetools.com

Thanks Dave. Understood.

Being able to see the sort order will make this a great deal easier to track.

Will let you know what we find.

Jayme