Conversation
|
Confirmed with Jetpack 2.7. |
|
This happens since it's also included by Twenty Fourteen, but WP-CLI tries to activate Jetpack after the theme is loaded instead of before the theme as core does, at least, as far as I can tell. I'm not sure how to fix this for WP-CLI. |
|
Either the class name in Jetpack or Twenty Fourteen (or both!) should get a prefix. /cc @blobaugh |
|
Themes should be able to expect that plugins are loaded first, and this is just one side effect of potentially many more issues caused by a theme being loaded before a plugin is activated. So this is something that should be fixed in WP-CLI if at all possible, regardless of changes in Jetpack or Twenty Fourteen. |
|
I don't think that's the problem. In the normal case, both WP and WP-CLI load themes after plugins. When activating plugins, both WP and WP-CLI load How I checked: a) added a |
|
Looks like you're right, Jetpack doesn't even include the I'm not sure how this is being included and conflicting with Twenty Fourteen then (but it certainly is, and only when using WP-CLI to activate Jetpack, not when activating from wp-admin). |
|
I think I've got it: the problem doesn't happen in wp-admin because the theme checks the if ( ! class_exists( 'Featured_Content' ) && 'plugins.php' !== $GLOBALS['pagenow'] ) {
require get_template_directory() . '/inc/featured-content.php';
} |
the expected value closes #917
|
Thanks for the patch @scribu. Also the suggestion made by @tierra to switch the theme to twentythirteen, activate jetpack, and then switch back to twentyfourteen works as an immediate stop gap measure if upgrading wp-cli is difficult in your enviroment.
|
Fresh install of WordPress 3.8 and JetPack 2.7
When I try to
I get the following response:
Fatal error: Cannot redeclare class Featured_Content in /public_html/wp-content/plugins/jetpack/modules/theme-tools/featured-content.php on line 24
Activating the plugin from the interface works just fine.