Make WordPress Core

Opened 6 months ago

#60248 new defect (bug)

Unable to delete theme placed in subdirectory

Reported by: wildworks's profile wildworks Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: Cc:


Originally reported in the Create Block Theme plugin repository:

Themes located in the subdirectory are recognized as installed themes and can be activated. On the other hand, themes located in the subdirectory will fail to be deleted. For example, if you delete the Twenrty Twenrty-three theme placed in the wp-content/test directory, the following response will be returned.

    "success": false,
    "data": {
        "delete": "theme",
        "slug": "testtwentytwentythree",
        "errorMessage": "The requested theme does not exist."

On the other hand, plugins placed in the subdirectory are not displayed as installed plugins.

My question is whether a theme placed in the subdirectory should be recognized as a valid theme in the first place.

The Create Block Theme plugin allows you to clone a theme by specifying the subdirectory. Also, in the PR below, there seems to be a case where the theme is placed in a subfolder.

One of the items in the "Edit" screen is now 'Theme Subfolder'. This was one of the primary things that I needed to add in order to work with themes with Revisr. When a theme is installed from a .zip file it's installed at the top-level of wp-content/themes. However to manage themes in a git repo (such as our /pub free themes) that theme needs to be in a subfolder. This new functionality lets a user move the theme from a top-level into a subfolder (or move it around into another subfolder, etc). This works my simply moving the folder and then re-activating the theme with the new location information

Change History (0)

Note: See TracTickets for help on using tickets.