User tests: Successful: Unsuccessful:
Pull Request for Issue #33936.
As explained in #33936 , the ordering value of each article record displayed in Articles management screen is having wrong value, thus it will make re-ordering articles not working as expected. This PR just fixes that issue
<?php echo (int) $item->id . ':' . $item->ordering; ?>
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content |
@richard67 Modify this line of code https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/tmpl/articles/default.php#L378 to:
<?php echo (int) $item->id . ':' . $item->ordering; ?>
You will see ordering value displayed next to ID of article like in my screenshot.
For drag and drop re-ordering, I think it works now because your installation has not had this PR #33937 applied yet (that correct logic of re-ordering items).
Technical, you can look at this line of code https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/src/Model/ArticlesModel.php#L276. It gets the ordering value from #__content_frontpage table, so in most case (unless the article you are viewing is featured article), the ordering value in Articles management would be null (because there is no related records in #__content_frontpage table).
On articles management (view articles), it should have ordering value from #__content table. However, due to the bug in correct code (left join with #__content_frontpage table), it always uses ordering from #__content_frontpage table, so it is wrong.
Hope that gives some more information.
I have tested this item
@joomdonation Maybe you should add that to the testing instructions for easier getting a 2nd tester, and mention that it's related to odering unfeatured articles.
@richard67 Done. Hope it is easier to understand and test now.
@joomdonation Yes, much better now.
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-20 17:51:38 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
@joomdonation Maybe it helps if you share with us your code modification for debugging this, i.e. showing the ordering with the ID like you did. Just by code review it's not really clear, and in a real test drag and drop ordering seems to work without this PR.