-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
child-theme throws an error if the --path argument is set #251
Comments
Just noticed that this issue is the same as mine. #263 There is a str_replace line that needs to be wrapped with realpath to fix the issue. |
parent_dir contains a normalized path whereas WP_CONTENT_DIR contains a relative path. By running the WP_CONTENT_DIR through realpath we get a path we can actually compare between the target dir and where we want to place the new theme. Also fixes wp-cli#251
Looks like this is still relevant, but the attached PR got closed by accident. It could be restored from https://gist.github.com/danielbachhuber/2951826b5cee4db3c8245ff095d5b7de though. @NielsdeBlaauw would you be interested in giving this another go? |
In this issue, are we talking about Windows setup? In Mac, I am not being able to reproduce the mentioned issue. |
Since I posted this, and considering how the paths look like I would say it wasn't a Windows environment but I can't remember for sure since it was 4 years ago. |
I keep getting an error message that I need to install the parent theme, even though the parent theme is already installed. |
@sarahschopick Is it possible to provide detailed steps to reproduce the issue? And also your setup environment info. Asking because we are not being able to reproduce issue in our local setup. |
Bug Report
I am trying to create a child theme using the following command:
wp scaffold child-theme child-slug --parent_theme=parent-slug --theme_name="My child theme" --activate --path=../mywpsite/
It then throws this error:
However, if I execute the command directly from the ~/mywpsite/ folder, it works fine, but the folder has to exist before or I get the following error.
BUT, the folder AND files still have been created.
That being said, I need to have it work with the --path argument, so I'm assuming this is a bug.
How can this be fixed ?
Thank you
The text was updated successfully, but these errors were encountered: