The simpler media website CMS
Hi,
just encountered a strange problem with 1.58RC.
I have the following categories for examples:
Now when adding a new category and move it into a existing category (for example Graphics) i end with "scrambled" categories.
RAW Converter and Technics are now sub-categories of news - for example.
Re-Sorting and applying does not solve the problem - nor does manually editing the sort order in the news_categories table fix the problem.
Ralf
Comments
I cannot reproduce it. Any errors? Any specific settings?
I also cannot reproduce this. Look for error not only in the debug log/PHP error log but also your brower's console.
Also which browser are you using?
Strange, because in the database table the sorting looks ok. But in the backend (and frontend of course) it is displayed wrong.
On the backend it could have been a JS error with the nested sorting. But the frontend does use any of that.
Also try force clearing your browser cache. This can play all sorts of tricks as it is so persistent nowadys (not sure why it would here…)
Does sorting of albums and pages work for you? That all uses the same base principle… To my memory there has been no change in this area from 1.5.7.
Sorting of albums and pages are working ok.
Also sorting of the existing categories works. The problem only occurs when:
Creating a new category and move it as a sub-category to an existing category.
If that is a general problem it should also happen with pages… YOu did check the database sortorder values. They really were incorrect? Just to rule out a plain display issue.
Also again, what browser (+ version + system) please ?
The database sort order looks fine. Only the display is wrong.
Reproducable in:
Chrome 90.0.4430.85
Firefox 87
Just tried with Firefox 88 and Chrome 90 and sadly all works as expected for me…
Here is what happens:
Example:
'News' is category id 1 and sort order 000.
'CMS' is category id 2 and sort order 001.
'Wordpress' is category id 3 and sort order is 001-000.
This will display 'Wordpress' as a sub-category of 'CMS'' which is right.
After adding a new category and move it as a sub-category, 'Wordpress' has still the sort orderof 001-000, but is now displayed unter 'News'.
One additional thing I have noticed: Creating a new category has the sort-order NULL in the database table.
This will change if I move the catogory around. Not sure of this is related to the error.
That is weird. Because 001-000 is the correct sortorder for the first child of the 2nd entry… Did you try reploading the page several times without applying? Just to rule out any browser page cache doing unwanted things. I've seen it cause a lot unecessary trouble…
That is correct actually. Before you save on the list a new item technicaly has no order.
Yes I reloaded the page multiple times - after deleting browser cache.
It does not change anything.
No idea what happens here.
Unless we find a save way to reproduce this we can't do much sadly…
What I found out:
When i delete an existing category and create a new one, sorting works as it should be. This works until I have a total of 16 categories.
If I create 17 categories, sorting goes wrong.
I
Thanks for the specifics. I can confirm this happening starting with category 17 but only one time. As soon as I delete and add some more categories the sort order is correct again. However every new category indeed gets sortorder NULL after saving.
The sortorder is only set when categories are moved and saved again.
Hi Fretzl,
thanks a lot for reproducing it.
Now i am sure that there is nothing wrong with my database/installation.
and thanks for the tipp with the deleting and adding categories again. This will solve my problem with adding more categories.
Ralf
Sadly I can also reproduce this with 17 categories.Null is the default value of the database field. Perhaps we can workaround by setting it to an explicit 000 value on creating new items.
In any case this issue should really also happen with all other nested sorting like page as they all use the same principle.
1.5.8RC now has a change that should fix this. New items now get the next toplevel sortorder on creation so they are correctly at the end of the list.
Works for me :-)
Hi,
works for me too.
BTW: Thanks for your help with this one!
No, thank you, it was a bug after all.