[wp-trac] [WordPress Trac] #50048: wp_ajax_update_theme is broken when updating themes whose styles.css file is not located in the root

WordPress Trac noreply at wordpress.org
Fri May 1 16:37:59 UTC 2020


#50048: wp_ajax_update_theme is broken when updating themes whose styles.css file
is not located in the root
--------------------------+-----------------------------
 Reporter:  novecode      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.4
 Severity:  normal        |   Keywords:
  Focuses:  template      |
--------------------------+-----------------------------
 Cannot update themes using wp_ajax_update_theme when templates aren't
 located in the theme root folder.

 Sample folder structure:

 {{{
 /wp-content/themes/my-theme/templates/style.css
 /wp-content/themes/my-theme/templates/functions.php
 /wp-content/themes/my-theme/templates/index.php
 }}}


 The template name is defined as "my-theme/templates", but
 "wp_ajax_update_theme" is striping the slash so it becomes "my-
 themetemplates". This is why it's unable to locate the theme and not
 starting the update process.

 Reference: https://core.trac.wordpress.org/browser/tags/5.4/src/wp-
 admin/includes/ajax-actions.php#L4118

 Is this the desired behavior?

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


More information about the wp-trac mailing list