Make WordPress Core

Opened 4 years ago

Closed 8 months ago

#55515 closed defect (bug) (wontfix)

About the problem that the php file of the theme editor and plugin editor cannot be edited in multi-site

Reported by: ishihara-takashi's profile ishihara takashi Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.9.2
Component: Networks and Sites Keywords: dev-feedback has-test-info
Focuses: multisite Cc:

Description

Nice to meet you.
Create a ticket for the first time. If you do not follow the rules, please let me know.

In multi-site, when editing with the theme editor and plugin editor of the management screen, the php file is in an uneditable state.

After verification, it was possible to solve it by changing the admin_url function on lines 552 to 562 of wp-admin / includes / file.php to the network_admin_url function.

https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/file.php#L552-L562

The problem is that I'm making a validation request containing wp_scrape_key for a php file, but even for multi-site the request is now sent to /wp-admin/theme-editor.php.

Therefore, when verifying wp_scrap_key, it will be redirected to /wp-admin/network/theme-editor.php and cannot be verified, resulting in loopback_request_failed that cannot be edited.

This seems to be happening at all multi-sites. If anyone knows, please let me know.

Attachments (1)

file.php (87.0 KB) - added by ishihara takashi 4 years ago.

Download all attachments as: .zip

Change History (5)

@ishihara takashi
4 years ago

#2 @realloc
10 months ago

  • Keywords dev-feedback has-testing-info added; has-patch removed

Thank you for reporting this issue and for providing a detailed analysis.

I tested the behaviour on both an existing and a fresh WordPress 6.8 multisite installation and was able to edit plugin and theme files directly through the editors without encountering any issues, as long as the proper access rights were set.

Since the problem no longer seems to occur in the latest version, and the functionality works as expected, I would suggest closing this ticket as “won’t fix.”

Thanks again for your efforts in improving WordPress.

#3 @wordpressdotorg
9 months ago

  • Keywords has-test-info added; has-testing-info removed

#4 @realloc
8 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.