Activate wporg-learn plugin at env setup#2503
Conversation
WordPress#2495 add wporg-learn to the list of plugins that need to be activated during the environment setup
WordPress#2495 remove double quotes from the import content command
adamwoodnz
left a comment
There was a problem hiding this comment.
Thanks for this!
I've tested and activating the plugin works, but the plugin also needs to be built.
In package.json we need to replace these lines:
"build": "yarn workspaces run build",
"create": "composer install && yarn setup:tools && yarn workspace wporg-learn-2024 run build && yarn run install:env",
"create:old": "composer install && yarn setup:tools && yarn workspaces run build && yarn run install:env:old",
with
"build": "yarn workspace wporg-learn-2024 run build && yarn workspace wporg-learn-plugin run build",
"build:old": "yarn workspace wporg-learn-theme run build && yarn workspace wporg-learn-plugin run build",
"create": "composer install && yarn setup:tools && yarn build && yarn run install:env",
"create:old": "composer install && yarn setup:tools && yarn build:old && yarn run install:env:old",
Could you please try that?
|
|
||
| # Import content | ||
| # npm run wp-env run cli "php bin/import-test-content.php" | ||
| # npm run wp-env run cli php bin/import-test-content.php |
There was a problem hiding this comment.
This line is commented out. When I uncomment it the import works now without the quotes. Did you intend to comment it?
There was a problem hiding this comment.
I thought that it was intentionally left uncommented. I made the changes to the build process and uncommented the import command.
I'm new to the project, so I'm unsure, but it looks like the build didn't work as expected.
The courses have been imported to the local database, I can see Tutorials and Lesson Plans, but the front end looks like this:
I suppose it should match: https://learn.wordpress.org/tutorials/?
I also looked at the build workflow and tried it out but had no luck. Any ideas?
There was a problem hiding this comment.
No that's pretty much as expected. The theme is very much a work in progress; the 'No learning pathways found' message needs aligning, and there will be no Tutorials moving forward, so that is the default archive template you're seeing there. We can update the content import at some point to drop the out of date content and add some Lessons and Courses.
Thanks again for your help, I'll do a final test and get this merged.
We split the build command for the old and new themes in WordPress/Learn#2503 See WordPress/Learn#2495


Activate the
wporg-learnplugin at the environment setup, as it's a theme's dependency.Fix the import content command by removing double quotes.
Fixes #2495