[wp-trac] [WordPress Trac] #61547: The theme editor does not work
WordPress Trac
noreply at wordpress.org
Tue Jul 2 06:28:57 UTC 2024
#61547: The theme editor does not work
-----------------------------------------------+---------------------------
Reporter: ntavares | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Administration | Version: 6.5.5
Severity: normal | Keywords:
Focuses: administration, php-compatibility |
-----------------------------------------------+---------------------------
After the latest WP Core update, the theme editor is not working, if I try
to edit any file it shows the following error: “Sorry, that file cannot be
edited.”
We do comment “**$file = wp_normalize_path( $file );**” in the **wp-
includes/functions.php** file and it works again with the same
configuration (active plugins, active theme, etc.).
After calling the **wp_normalize_path** function, the $file no longer
exists in $allowed_files. This **in_array( $file, $allowed_files, true )
return false**. I think it is due to the absolute path in windows with
backslashes.
It will probably only happen on a Windows server.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61547>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list