-
Notifications
You must be signed in to change notification settings - Fork 101
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
Activate wporg-learn plugin at env setup #2503
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
bin/index.sh
Outdated
@@ -27,4 +27,4 @@ npm run wp-env run cli wp theme activate pub/wporg-learn-2024 | |||
npm run wp-env run cli wp rewrite structure '/%postname%/' | |||
|
|||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Activate the
wporg-learn
plugin at the environment setup, as it's a theme's dependency.Fix the import content command by removing double quotes.
Fixes #2495