Skip to content

Local Environment: Child theme can't be activated #33

Closed

Description

@danielbachhuber

If you run wp-now --path=/path/to/child-theme, the theme can't be activated because the parent theme is missing.

The parent theme is missing because it isn't mounted into the filesystem.

Done is:

  • We're processing the style.css file for the parent them.
  • If there is a parent theme, we mount the corresponding directory to the filesystem.

Activity

  1. sejas commented on May 15, 2023

    @sejas
    Collaborator

    @katinthehatsite, Do you want to take this one?

  2. katinthehatsite commented on May 15, 2023

    @katinthehatsite
    Contributor

    let's do this - or at least attempt 😅

  3. danielbachhuber commented on May 18, 2023

    @danielbachhuber
    MemberAuthor

    @katinthehatsite I'm going to pick this up so you can focus on your upcoming project.

  4. removed their assignment
    on May 18, 2023
  5. danielbachhuber commented on May 18, 2023

    @danielbachhuber
    MemberAuthor

    With some more reflection, I actually want to hold off on fixing this for now:

    • Allow a configuration to map other folders and files #19 might be a more durable fix, because the parent theme can be located in other theme directories.
    • It might be nice to automatically install the parent theme from WordPress.org, but I don't know if this is a safe assumption to make.

    I'd love to hear more reports from folks who run into this in the wild, and what their scenario is.

  6. cpapazoglou commented on May 19, 2023

    @cpapazoglou
    • It might be nice to automatically install the parent theme from WordPress.org, but I don't know if this is a safe assumption to make.

    If it doesn't exist locally and if it's a .org theme, yes, it would be nice!

  7. dmsnell commented on May 19, 2023

    @dmsnell
    Member

    Noting here that WordPress also fails if the parent theme is missing. If we can mirror WordPress behavior that seems sufficient. If WordPress can auto-install then that seems reasonable, but for many themes we know this is impossible because they don't exist in the registry.

    For those cases it seems sufficient to scope-limit this tool to not solve problems WordPress itself doesn't solve.

  8. danielbachhuber commented on May 19, 2023

    @danielbachhuber
    MemberAuthor

    I'm also not sure if we can know definitively that a given theme is a WordPress.org theme.

  9. cpapazoglou commented on May 19, 2023

    @cpapazoglou

    I'm also not sure if we can know definitively that a given theme is a WordPress.org theme.

    3pd themes usually don't have a slug used in .org. For example

    https://api.wordpress.org/themes/info/1.1/?action=theme_information&request%5Bslug%5D=astra returns data for astra theme.

  10. wojtekn commented on May 19, 2023

    @wojtekn
    Collaborator

    For those cases it seems sufficient to scope-limit this tool to not solve problems WordPress itself doesn't solve.

    I agree with @dmsnell , local environment tool shouldn't solve WordPress problems that way.

    Activating the parent theme would be enough, assuming we use 'wp-content' mode with both themes available or we have support for paths mapping.

  11. danielbachhuber commented on Jun 1, 2023

    @danielbachhuber
    MemberAuthor

    This came up again with #39

    For now, let's mount the parent theme directory too if it sits alongside the child theme. More complex configurations can be handled with #19

  12. assigned and unassigned on Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingwp-now

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions