[wp-trac] [WordPress Trac] #41901: Updating fails for themes with style.css in sub directory.

WordPress Trac noreply at wordpress.org
Sun Sep 17 04:54:05 UTC 2017


#41901: Updating fails for themes with style.css in sub directory.
--------------------------+-----------------------------
 Reporter:  inc2734       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Themes        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 https://github.com/WordPress/WordPress/blob/4.8-branch/wp-
 includes/theme.php#L466-L513
 I saw this part and decided to put style.css in /themes/my-theme/subdir/

 And in fact it worked. But, there was one problem. That's about updating
 the theme. ( I update this theme from GitHub instead of WP.org. )

 In /wp-admin/update-core.php, Updating is success. At this time in
 site_transient_update_themes, There was a value of `my-theme/subdir` as a
 slug.

 In /wp-admin/themes.php, Updating is failed. An error message was
 displayed `The theme is at the latest version.`. At that time, the
 response of ajax was as follows.

 {{{
 {
   "success":false,
   "data": {
     "update":"theme",
     "slug":"my-themesubdir",
     ....
 }
 }}}

 That is, the slash has disappeared. When I looked it up, it was
 `wp_unslash()` when updating here.

 I think that it is better to unify processing for slashes on either page.

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


More information about the wp-trac mailing list