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

[5.1] Template Manager - Some folders not displayed in alphabetical order #40605

Closed
dautrich opened this issue May 16, 2023 · 24 comments
Closed

Comments

@dautrich
Copy link

dautrich commented May 16, 2023

Steps to reproduce the issue

  1. Use or create a site with at least one additional frontend template (in addition to Cassiopeia)
  2. Login to the backend and move to System - Site Templates
  3. Open 'Details and Files' of your additional template
  4. Unfold the folders under /media/templates/site/[Your template]

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:

Screenshot 2023-05-16 at 11-32-04 Templates Customise (J51_skylar) - Lebenswert Neudorf - Administration

System information (as much as possible)

Joomla 4.3.1, template 'Skylar_J4' from Joomla51 (Version 1.1.8)

Additional comments

@richard67
Copy link
Member

Joomla 4.3.1, template 'Skylar_J4' from Joomla51 (Version 1.1.8)

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.

@richard67 richard67 added the bug label May 16, 2023
@dgrammatiko
Copy link
Contributor

AFAIR the order is what comes out of the readdir php function. There shouldn’t be affected by anything in the xml file

@richard67
Copy link
Member

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 .

@dgrammatiko
Copy link
Contributor

dgrammatiko commented May 16, 2023

@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/

@richard67
Copy link
Member

@richard67 actually I was wrong, the output is what comes out from scandir:

Hmm, that's strange. Maybe we have to sort that somehow? I will check when I have more time.

@dgrammatiko
Copy link
Contributor

I think it's the recursive part that breaks the order (or maybe not)

@Hackwar Hackwar added the PBF Pizza, Bugs and Fun label Aug 25, 2023
@rdeutz
Copy link
Contributor

rdeutz commented Aug 26, 2023

tried to reproduce the bug but couldn't confirm

@brianteeman brianteeman removed the PBF Pizza, Bugs and Fun label Sep 1, 2023
@dautrich
Copy link
Author

dautrich commented Sep 6, 2023

@rdeutz Do you think my screenshot is a fake? I see the bug daily when looking into my template.

@dautrich
Copy link
Author

I changed the title of this issue because it still shows under J5.1:

grafik

@dautrich
Copy link
Author

@richard67 @dgrammatiko
This is not a severe issue, but a bit annoying. Could you pls check again?

@dgrammatiko
Copy link
Contributor

What's your operating system of the server that this issue occurs?

@dautrich
Copy link
Author

=============
Systeminformationen

php: Linux sh16-23 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64
dbserver: mysql
dbversion: 8.0.33-0ubuntu0.20.04.1
dbcollation: utf8mb4_0900_ai_ci
dbconnectioncollation: utf8mb4_0900_ai_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 8.3.6
server: Apache
sapi_name: cgi-fcgi
version: Joomla! 5.1.0 Stable [ Kudumisha ] 16-April-2024 16:00 GMT
compatpluginenabled: true
compatpluginparameters:
useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0

@Quy
Copy link
Contributor

Quy commented Apr 22, 2024

On the server, browse /media/templates/site/j51_skylar/css to see how these files are listed.
If possible, install on a different server to see if it is reproducible.

@brianteeman
Copy link
Contributor

just to rule something out can you p;ease retest with Joomla in English

@dautrich
Copy link
Author

grafik

@dautrich
Copy link
Author

@Quy
grafik

@dautrich dautrich changed the title [4.3] Template Manager - Some folders not displayed in alphabetical order [5.1] Template Manager - Some folders not displayed in alphabetical order Apr 22, 2024
@dautrich
Copy link
Author

@Quy
I just tested a different website (but with the same template) on localhost via XAMPP, but I get exactly the identical issue:

grafik

=============
System Information

php: Windows NT DP3450 10.0 build 22631 (Windows 11) AMD64
dbserver: mysql
dbversion: 10.4.32-MariaDB
dbcollation: utf8mb4_general_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: false
phpversion: 8.2.12
server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
sapi_name: apache2handler
version: Joomla! 5.1.0 Stable [ Kudumisha ] 16-April-2024 16:00 GMT
compatpluginenabled: true
compatpluginparameters:
useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0

@brianteeman
Copy link
Contributor

can you confirm that you only see it with this template?

@dautrich
Copy link
Author

@brianteeman Yes, because it is the only one I use (apart from test sites with Cassiopeia). Should we try to involve Ciaran Walsh?

@dgrammatiko
Copy link
Contributor

@dautrich what Brian asked was to try to open the cassiopeia files view and report if those files are displayed properly sorted.

@dautrich
Copy link
Author

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.

@brianteeman
Copy link
Contributor

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

@HLeithner
Copy link
Member

I found the issue and will prepare an pr in a couple of minutes.

@HLeithner
Copy link
Member

Please test #43335 closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants