Opened 5 years ago
Last modified 5 years ago
#47544 new enhancement
Code Editor not listing files/folders in the right order
Reported by: | superpoincare | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | minor | Version: | 5.2.1 |
Component: | Administration | Keywords: | needs-patch |
Focuses: | Cc: |
Description
On new installations on test sites, I have seen the correct order for listing of files/folders in the code editor.
ie:
- important files
- folders
- files in the root.
However, in my installation, I don't get the same order.
Example screenshot attached.
readme.txt and composer.json should be lower in the list.
Change History (3)
#2
@
5 years ago
I am getting
query-monitor.php
assets (folder)
classes (folder)
collectors (folder)
dispatchers (folder)
output (folder)
wp-content (folder)
composer.json
readme.txt
on the Sandbox test site on a clean install.
Which seems different from yours but seems most natural but different from yours.
On my personal site, I used the health check plugin and entered the troubleshoot mode, but still am getting the same result as the screenshot.
#3
@
5 years ago
- Keywords needs-patch added; reporter-feedback removed
- Milestone changed from Awaiting Review to Future Release
Looking at this again with Theme Editor and Twenty Nineteen on Windows, the order is indeed a bit random, apparently a mix of sorting by extension and name:
style.css functions.php print.css style-editor-customizer.css style-editor.css style-rtl.css js (folder) postcss.config.js package-lock.json package.json 404.php archive.php classes (folder) comments.php footer.php header.php image.php inc (folder) index.php page.php search.php single.php template-parts (folder) print.scss sass (folder) style-editor-customizer.scss style-editor.scss style.scss readme.txt
style.css
and functions.php
are at the top, as expected, but the rest of the list could indeed be sorted in a more logical order.
Thanks for the report!
Looking at get_plugin_files() used to display the tree, the default order is:
This appears to match what I'm seeing on a clean install:
Does the issue still happen with all plugins disabled and a default theme activated?
#24049 is a related ticket, but I can't reproduce that one either in current trunk, appears to be fixed in [41806].