Type of feedback
//dev
Description
I'm seeing a fatal error while running yarn run create:
Fatal error: Uncaught Error: Call to undefined function WPOrg_Learn\Sensei\get_my_courses_page_url() in /var/www/html/wp-content/themes/pub/wporg-learn-2024/functions.php:113
Stack trace:
#0 /var/www/html/wp-includes/class-wp-hook.php(324): WordPressdotorg\Theme\Learn_2024\add_site_navigation_menus(Array)
#1 /var/www/html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#2 /var/www/html/wp-content/mu-plugins/wporg-mu-plugins/mu-plugins/blocks/navigation/index.php(29): apply_filters('wporg_block_nav...', Array)
#3 /var/www/html/wp-includes/class-wp-hook.php(324): WordPressdotorg\MU_Plugins\Navigation_Block\init('')
#4 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#5 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#6 /var/www/html/wp-settings.php(700): do_action('init')
#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1336): require('/var/www/html/w...')
#8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1 in /var/www/html/wp-content/themes/pub/wporg-learn-2024/functions.php on line 113
Looks like the wporg-learn plugin isn't active yet when the theme is activated.
The fatal occurs on https://github.com/WordPress/Learn/blob/trunk/wp-content/themes/pub/wporg-learn-2024/functions.php#L113C15-L113C38
Proposed solution
I was able to make it work by adding wporg-learn at the end of:
https://github.com/WordPress/Learn/blob/trunk/bin/index.sh#L18
Step-by-step reproduction instructions (optional)
Make sure to run yarn run wp-env destroy in case your installation has the plugin already active.
Follow the steps under "Setup 2024 version":
Screenshots or screen recording (optional)
Other information (optional)
Replicated on MacOS, with Node 18 and 20
Type of feedback
//dev
Description
I'm seeing a fatal error while running
yarn run create:Looks like the wporg-learn plugin isn't active yet when the theme is activated.
The fatal occurs on https://github.com/WordPress/Learn/blob/trunk/wp-content/themes/pub/wporg-learn-2024/functions.php#L113C15-L113C38
Proposed solution
I was able to make it work by adding
wporg-learnat the end of:https://github.com/WordPress/Learn/blob/trunk/bin/index.sh#L18
Step-by-step reproduction instructions (optional)
Make sure to run
yarn run wp-env destroyin case your installation has the plugin already active.Follow the steps under "Setup 2024 version":
Screenshots or screen recording (optional)
Other information (optional)
Replicated on MacOS, with Node 18 and 20