• Resolved Saket Jajodia

    (@dzire2dzine)


    I am getting multiple notices when I activate jetpack plugin

    [30-Apr-2025 02:49:56 UTC] PHP Notice: Function wp_is_block_theme was called incorrectly. This function should not be called before the theme directory is registered. Please see Debugging in WordPress for more information. (This message was added in version 6.8.0.) in /home/***/wp-includes/functions.php on line 6121

    I did quick search for wp_is_block_theme via SSH and got this (not sure if it helps):

    plugins/jetpack/jetpack_vendor/automattic/jetpack-blocks/src/class-blocks.php:          $is_fse_theme = wp_is_block_theme();
    plugins/jetpack/jetpack_vendor/automattic/jetpack-blocks/CHANGELOG.md:- FSE: remove usage of
    gutenberg_is_fse_theme for modern wp_is_block_theme [#30806]
    plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php: * @since 1.49.0 Uses wp_is_block_theme() instead of deprecated gutenberg_is_fse_theme().
    plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-functions.php: return wp_is_block_theme();
    plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/CHANGELOG.md:- FSE: remove usage of gutenberg_is_fse_theme for modern wp_is_block_theme [#30806]
    plugins/jetpack/jetpack_vendor/automattic/jetpack-search/src/initializers/class-initializer.php: if ( ! wp_is_block_theme() ) {
    plugins/jetpack/jetpack_vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-portfolio.php: if ( ! wp_is_block_theme() ) {
    plugins/jetpack/jetpack_vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial.php: if ( ! wp_is_block_theme() ) {
    plugins/jetpack/jetpack_vendor/automattic/jetpack-classic-theme-helper/src/class-social-links.php: if ( ! ( ! wp_is_block_theme() && current_theme_supports( 'social-links' ) && function_exists( 'publicize_init' ) ) ) {
    plugins/jetpack/jetpack_vendor/automattic/jetpack-classic-theme-helper/src/class-featured-content.php: if ( ! wp_is_block_theme() ) {
    plugins/jetpack/jetpack_vendor/automattic/woocommerce-analytics/src/class-woo-analytics-trait.php: $this->cart_checkout_templates_in_use = wp_is_block_theme()
    plugins/jetpack/jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-wpcom-admin-menu.php: if ( wp_is_block_theme() ) {
    plugins/jetpack/jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-jetpack-admin-menu.php: if ( ! has_action( 'customize_register' ) && wp_is_block_theme() ) {
    plugins/jetpack/modules/google-fonts/current/class-jetpack-google-font-face.php: if ( wp_is_block_theme() ) {
    plugins/jetpack/modules/plugin-search.php: if ( wp_is_block_theme() ) {
    plugins/jetpack/modules/related-posts/jetpack-related-posts.php: $enabled_on_singular_views = wp_is_block_theme()
    plugins/jetpack/modules/related-posts/class.related-posts-customize.php: if ( ! wp_is_block_theme() ) {
    plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-trait.php: $this->cart_checkout_templates_in_use = wp_is_block_theme() && class_exists( 'Automattic\WooCommerce\Blocks\Package' ) && version_compare( Automattic\WooCommerce\Blocks\Package::get_version(), '10.6.0', '>=' );
    plugins/jetpack/modules/sharedaddy/sharing.php: $is_block_theme = wp_is_block_theme();
    plugins/jetpack/class.jetpack-admin.php: if ( wp_is_block_theme() ) {
    plugins/jetpack/class.jetpack-admin.php: ( wp_is_block_theme() && ! empty( wp_get_custom_css() ) ) // Do the same if the theme is block-based but has existing custom CSS.
    plugins/jetpack/sal/class.json-api-site-jetpack.php: * @since 12.2 Uses wp_is_block_theme() to determine if site is eligible instead of gutenberg_is_fse_theme().
    plugins/jetpack/sal/class.json-api-site-jetpack.php: return wp_is_block_theme();
    plugins/jetpack/CHANGELOG.md:- Full-Site Editing: Use modern wp_is_block_theme instead of gutenberg_is_fse_theme. [#30806]
    plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php: if ( ! wp_is_block_theme() ) { // TODO Fallback for classic themes.
    plugins/jetpack/extensions/blocks/sharing-button/sharing-button.php: if ( ! wp_is_block_theme() ) {
    plugins/jetpack/extensions/blocks/subscriptions/class-jetpack-subscription-site.php: if ( ! wp_is_block_theme() ) { // TODO Fallback for classic themes.
    plugins/jetpack/extensions/blocks/subscriptions/class-jetpack-subscription-site.php: if ( ! wp_is_block_theme() ) { // Fallback for classic themes.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi there,

    The easiest solution to address this would be to disable the display of PHP messages in the browser. This option should be available through your hosting provider. If you’re unsure how to do this, please reach out to them for assistance.

    The PHP messages being shown are not actual errors, but notices: they indicate that something isn’t working quite as expected. Since these messages are displayed in the browser, they interfere with the login process. Hiding them should resolve the issue immediately.

    The notice refers to a call to the WordPress function wp_is_block_theme(), which appears to be triggered too early. This can be caused by a plugin or a theme. You’ve already deactivated all plugins and switched themes, but it’s possible that multiple themes might cause the same issue. Once you’re able to log in again, I recommend activating a default theme like TwentyTwentyFive, which should help prevent this problem.

    Additionally, check for any must-use (MU) plugins on your site, as they could also be responsible. These plugins can only be removed via FTP.

    Let us know if that helps! If not, could you please post your site URL here so that we can have a look? If you want it to remain private, you can also contact us via contact form. If you choose to reach out directly, please include a link to this thread. Thanks!

Viewing 1 replies (of 1 total)

The topic ‘wp_is_block_theme was called incorrectly’ is closed to new replies.