New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.4] Fix ordering for files in the template view #43335
base: 4.4-dev
Are you sure you want to change the base?
[4.4] Fix ordering for files in the template view #43335
Conversation
administrator/components/com_templates/src/Model/TemplateModel.php
Outdated
Show resolved
Hide resolved
@HLeithner |
Is the image a before or after. If after then it is showing the folders in the tree not being in alphabetical order |
I think so, I didn't see much changes since 4.4 in 5.1 |
I have tested this item ✅ successfully on f3a8732 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43335. |
f3a8732
to
11ba034
Compare
correct php fooled me and the over complicated php code didn't make it better. I updated the code and moved from uasort to uksort. Now it works as expected. |
Now I am really confused. The original PR used uasort and did not work with cassiopeia. Yet @dautrich says it does work with the j51 template |
it partly works with cassiopeia as you pointed out based on the image (media folder -> images shouldn't be on the last place, btw. this information in you comment would have saved me 10 minutes...). so his test is wrong. |
Please review #25792 |
done |
@HLeithner |
Plz |
I have tested this item ✅ successfully on 4edaa4c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43335. |
@HLeithner |
Will be upmerged so no test/PR for 5.1 needed thankd |
I have tested this item ✅ successfully on 4edaa4c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43335. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43335. |
Pull Request for Issue #40605 .
Summary of Changes
Order is now using the right values for displaying directory structure for templates in the backend.
This could happen on posix filesystems because the natural order is the file creation and not the alphabetical order.
Testing Instructions
Check if your directories and files are sorted in the corrected order
Actual result BEFORE applying this Pull Request
The order was only for directories correct
Expected result AFTER applying this Pull Request
Sorting happens in the model and not longer in the view for directories and files.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Additional