In backend go for example in the articles list and set ordering to "Ordering descending". When you try to reorder an item you will see this javascript error in the console:
Uncaught TypeError: f.reverse is not a function
Generally trying to reorder items with "Ordering descending" is a problem at other places such as in the category list or the module list.
Labels |
Added:
?
|
reverse()
requires an array, so it's most likely that wrapper.querySelectorAll('[name="order[]"]')
isn't returning anything.
Check the view: https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/tmpl/articles/default.php#L222
its not returning anything because there is nothing for it to return when there should be
When in descending order, ordering should be disabled. Check Categories.
It is returning a nodelist that reverse
cannot be performed on. Sadly, I don't know JavaScript to provide a fix.
NodeList(3)
0: <input class="width-20 text-area-order hidden" type="text" name="order[]" size="5" value="2" data-order="2">
1: <input class="width-20 text-area-order hidden" type="text" name="order[]" size="5" value="3" data-order="1">
2: <input class="width-20 text-area-order hidden" type="text" name="order[]" size="5" value="1" data-order="3">
You need to convert the nodelist to an array
[].slice.call(document.querySelectorAll('[name="order[]"]'))
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-23 23:17:01 |
Closed_By | ⇒ | Quy |
https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/system/js/draggable.es6.js#L59
@C-Lodder