[wp-trac] [WordPress Trac] #43145: Theme Editor unable to edit PHP files for Active theme of Main Site in a Multisite system

WordPress Trac noreply at wordpress.org
Tue Jan 23 01:58:51 UTC 2018


#43145: Theme Editor unable to edit PHP files for Active theme of Main Site in a
Multisite system
---------------------------------------+-----------------------------
 Reporter:  Otto42                     |      Owner:
     Type:  defect (bug)               |     Status:  new
 Priority:  normal                     |  Milestone:  Awaiting Review
Component:  General                    |    Version:  4.9.2
 Severity:  normal                     |   Keywords:
  Focuses:  administration, multisite  |
---------------------------------------+-----------------------------
 Originally reported here: https://wordpress.org/support/topic/theme-
 editor-cannot-edit-php-files/

 Was able to reproduce on my own multisite instance.

 Editing any PHP file of the theme which is active on the "main" site of
 the multisite instance will result in a "Something went wrong" message.

 Narrowed it down to the wp_remote_get calls (either the one to wp-admin
 /theme-editor.php or the one to home_url) timing out, in the $is_active
 section of the function wp_edit_theme_plugin_file().

 This does not happen on any other theme, nor any other plugin as far as I
 can determine. Those edits go through fine, however you would expect them
 to, as other themes are not the "active" one, although I cannot account
 for why plugins would not register as "active" in this case. Perhaps
 network activated plugins are not detected as active here and thus do not
 trigger this code.

 While the /wp-admin/theme-editor.php call does redirect to /wp-
 admin/network/theme-editor.php, I'm not sure of the underlying problem
 here. I think it may have something to do with the difference between the
 transients and the site_transient, but I'm been unable to narrow it down
 further. Reporting as a bug in case anybody else has better ideas.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43145>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list