Skip to content
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

Open
wants to merge 5 commits into
base: 4.4-dev
Choose a base branch
from

Conversation

HLeithner
Copy link
Member

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

image

@dautrich
Copy link

@HLeithner
The fix is for J4, isn't it? Can I apply the patch to J5.1 as well?

@brianteeman
Copy link
Contributor

Is the image a before or after. If after then it is showing the folders in the tree not being in alphabetical order

@HLeithner
Copy link
Member Author

I think so, I didn't see much changes since 4.4 in 5.1

@dautrich
Copy link

I have tested this item ✅ successfully on f3a8732

I successfully tested the PR on a J5.1.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43335.

@HLeithner HLeithner force-pushed the 4.4/fix/template-file-ordering branch from f3a8732 to 11ba034 Compare April 23, 2024 12:08
@HLeithner
Copy link
Member Author

Is the image a before or after. If after then it is showing the folders in the tree not being in alphabetical order

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.

Here the image from joomla 5.1:
image

@brianteeman
Copy link
Contributor

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

@HLeithner
Copy link
Member Author

HLeithner commented Apr 23, 2024

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.

@dautrich
Copy link

Template Skylar

grafik

@MacJoom MacJoom self-assigned this Apr 23, 2024
@brianteeman
Copy link
Contributor

Please review #25792

@HLeithner
Copy link
Member Author

Please review #25792

done

@HLeithner HLeithner added the bug label Apr 24, 2024
@dautrich
Copy link

@HLeithner
Do you want me to re-test this?

@HLeithner
Copy link
Member Author

@HLeithner Do you want me to re-test this?

Plz

@dautrich
Copy link

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.

@dautrich
Copy link

dautrich commented Apr 29, 2024

43335 - 2024-04-29

@HLeithner
Would you like me to test this patch on J5.1.0 as well, or will you provide a separate PR for J5.1.0?

@HLeithner
Copy link
Member Author

43335 - 2024-04-29

@HLeithner Would you like me to test this patch on J5.1.0 as well, or will you provide a separate PR for J5.1.0?

Will be upmerged so no test/PR for 5.1 needed thankd

@viocassel
Copy link
Contributor

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.

@Quy Quy removed the bug label May 2, 2024
@Quy
Copy link
Contributor

Quy commented May 2, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43335.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 2, 2024
@Quy Quy added the bug label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PR-4.4-dev RTC This Pull Request is Ready To Commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants