-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[5.1] Template Manager - Some folders not displayed in alphabetical order #40605
Comments
I think the Skylar template is not the problem here as the template manager runs in the administrator (backend). @dgrammatiko Does the ordering of the files and folders in the template manager somehow depend on the template's XML file? I don't think so, but I thought I ask you, maybe you know it better. |
AFAIR the order is what comes out of the readdir php function. There shouldn’t be affected by anything in the xml file |
Yes, that's what I would think, too. It seems readdir doesn't necessarily work in alphabetical order. There is a StackOverflow topic about that, where someone recommends to use scandir instead: https://stackoverflow.com/questions/541510/php-readdir-not-returning-files-in-alphabetical-order . |
@richard67 actually I was wrong, the output is what comes out from scandir:
Possible solution https://itecnote.com/tecnote/php-sort-directory-listing-using-recursivedirectoryiterator/ |
Hmm, that's strange. Maybe we have to sort that somehow? I will check when I have more time. |
I think it's the recursive part that breaks the order (or maybe not) |
tried to reproduce the bug but couldn't confirm |
@rdeutz Do you think my screenshot is a fake? I see the bug daily when looking into my template. |
@richard67 @dgrammatiko |
What's your operating system of the server that this issue occurs? |
=============
|
On the server, browse |
just to rule something out can you p;ease retest with Joomla in English |
@Quy =============
|
can you confirm that you only see it with this template? |
@brianteeman Yes, because it is the only one I use (apart from test sites with Cassiopeia). Should we try to involve Ciaran Walsh? |
@dautrich what Brian asked was to try to open the cassiopeia files view and report if those files are displayed properly sorted. |
I've set Cassiopeia to standard template for all files. Looking at the template files, they are properly ordered. Having seen this, I also believe that the issue is something related to the Skylar template. If you don't want to invest any more time in this, I'm going to close this issue. |
The problem is that no one has reproduced this and as the template youare using it is commercial we dont have access to reproduce it ourselves with that template |
I found the issue and will prepare an pr in a couple of minutes. |
Please test #43335 closing this. |
Steps to reproduce the issue
Expected result
Within each folder, the files should be displayed in alphabetical order
Actual result
Within each folder, the files are not displayed in alphabetical order:
System information (as much as possible)
Joomla 4.3.1, template 'Skylar_J4' from Joomla51 (Version 1.1.8)
Additional comments
The text was updated successfully, but these errors were encountered: