WordPress.org

Make WordPress Core

Opened 16 months ago

#41901 new defect (bug)

Updating fails for themes with style.css in sub directory.

Reported by: inc2734 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: Cc:

Description

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.

Attachments (2)

patch-41901.diff (504 bytes) - added by inc2734 16 months ago.
patch-41901.2.diff (805 bytes) - added by inc2734 16 months ago.

Download all attachments as: .zip

Change History (2)

Note: See TracTickets for help on using tickets.