You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issues using WordPress Playground VSCode extension with Learn WordPress project #39
This repo has a custom plugin and child theme, so running from the project root would be the ideal local dev scenario, and this is how we currently run the project with wp-env.
I'll look into this. I think we need to refresh the VS Code Extension's internals (#4) to get closer to the behavior you expect. It would also be nice to add some debugging mechanism for the crashes (#36).
Result: Notification that server started, browser loads site but TT3 theme is active because parent theme isn’t available.
@adamwoodnz Out of curiosity, what is your expected behavior for this scenario? Related #33
Thanks! Yeah debugging info would be useful, I did look in the Output tab but didn't see anything. I see on #36 that others have.
@adamwoodnz Out of curiosity, what is your expected behavior for this scenario?
For this scenario I've just tried again to see exactly what the state was in the admin, but I now can't start the server. Not sure what changed :(
From memory what I saw in wp-admin is that the Learn child theme (wporg-learn-2020) was installed but couldn't be activated due to the parent (wporg) not being mounted.
Ideally the child theme would be installed and activated, but if that's not possible then at least having the parent installed to allow child activation would be my expectation. The parent is obviously sitting up a level from where the command is run.
Worth noting that with this particular project (and maybe most website projects in general) we wouldn't be developing the theme or plugin independently, and the 'full project' scenario above is really the critical workflow.
@adamwoodnz As a very first step, we published a new version of the VS Code Extension this morning to start to unblock this 😊
Here's what I ran to set things up:
git clone git@github.com:WordPress/Learn.git wordpress-learn
cd wordpress-learn
yarn
composer install
yarn workspaces run build
When I clicked 'Start WordPress Server' in the project directory, here's what I see:
Notably, it's starting in 'playground' mode and didn't mount your wp-content directory.
When I clicked 'Start WordPress Server' in the wp-content directory, here's what I see:
It started in the 'wp-content' mode (expected) but is having trouble with the theme paths. The plugins are mounted but it looks like Gutenberg is out of date and fataling for some reason.
When I clicked 'Start WordPress Server' in the wp-content/plugins/gutenberg directory, here's what I see:
Gutenberg is mounted as expected but probably fatals when it's attempted to be auto-activated.
Activity
danielbachhuber commentedon May 31, 2023
I'll look into this. I think we need to refresh the VS Code Extension's internals (#4) to get closer to the behavior you expect. It would also be nice to add some debugging mechanism for the crashes (#36).
@adamwoodnz Out of curiosity, what is your expected behavior for this scenario? Related #33
adamwoodnz commentedon Jun 1, 2023
Thanks! Yeah debugging info would be useful, I did look in the Output tab but didn't see anything. I see on #36 that others have.
For this scenario I've just tried again to see exactly what the state was in the admin, but I now can't start the server. Not sure what changed :(
From memory what I saw in
wp-adminis that the Learn child theme (wporg-learn-2020) was installed but couldn't be activated due to the parent (wporg) not being mounted.Ideally the child theme would be installed and activated, but if that's not possible then at least having the parent installed to allow child activation would be my expectation. The parent is obviously sitting up a level from where the command is run.
Worth noting that with this particular project (and maybe most website projects in general) we wouldn't be developing the theme or plugin independently, and the 'full project' scenario above is really the critical workflow.
danielbachhuber commentedon Jun 1, 2023
@adamwoodnz As a very first step, we published a new version of the VS Code Extension this morning to start to unblock this 😊
Here's what I ran to set things up:
When I clicked 'Start WordPress Server' in the project directory, here's what I see:
Notably, it's starting in 'playground' mode and didn't mount your
wp-contentdirectory.When I clicked 'Start WordPress Server' in the
wp-contentdirectory, here's what I see:It started in the 'wp-content' mode (expected) but is having trouble with the theme paths. The plugins are mounted but it looks like Gutenberg is out of date and fataling for some reason.
When I clicked 'Start WordPress Server' in the
wp-content/plugins/gutenbergdirectory, here's what I see:Gutenberg is mounted as expected but probably fatals when it's attempted to be auto-activated.
Launching in a child theme will be handled by #33
It seems like we have a bit of work to do if we want to offer the VS Code Extension or
wp-nowfor WordCamp Europe 😊 cc @adamziel @sejasAlso, while I'm thinking of it: I wonder if
projectPathshould be defined as the git repo directory if we look upwards and find one.danielbachhuber commentedon Jun 1, 2023
This might just be a rough NUX. The
wporg-learn-2020theme seemed to activate just fine, although it requires some plugins to be activated too.Here's what I see on the frontend:
It seems like links are hardcoded though, and pretty permalinks don't work:
I guess we might need the Blueprint thing (#9) to deliver a pre-configured state...
adamziel commentedon Jun 2, 2023
@danielbachhuber Yay for Blueprints. Using them would also make it easy to preview Pull Requests for that repo in the browser.
sejas commentedon Jun 2, 2023
I think to fully support Learn we will need to support mapping directories:
danielbachhuber commentedon Jun 2, 2023
Probably the ability to define
wp-config.phpconstants too #17adamziel commentedon Jun 2, 2023
Constants can be defined with Blueprints (as outlined in #17). The mappings cannot, though.
Don't include static files in the build. (WordPress#43)