• Resolved N1ghteyes

    (@n1ghteyes)


    I’m currently seeing logs full of:

    Function WP_Block_Patterns_Registry::register was called incorrectly. Pattern content must be a string. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.) in /var/www/html/web/wp/wp-includes/functions.php on line?6085

    By process of elimination, (turning plugins and themes off) I’ve narrowed it down to WooCommerce.

    /class-wp-block-patterns-registry.php:309 seems to be the offending line.

    register_block_pattern(?$pattern_name =?‘woocommerce/coming-soon-store-only’,?$pattern_properties =?[‘title’ => ‘Coming Soon Store Only’, ‘slug’ => ‘woocommerce/coming-soon-store-only’, ‘description’ => ”, ‘categories’ => [0 => ‘woo-commerce’], ‘inserter’ => FALSE, ‘featureFlag’ => ‘launch-your-store’, ‘templateTypes’ => ”, ‘source’ => ‘/var/www/cws.eunomia.apexl/web/app/plugins/woocommerce/patterns/coming-soon-store-only.php’]?)…/PatternRegistry.php:203

    WP_Block_Patterns_Registry->register(?$pattern_name =?‘woocommerce/coming-soon-store-only’,?$pattern_properties =?[‘title’ => ‘Coming Soon Store Only’, ‘slug’ => ‘woocommerce/coming-soon-store-only’, ‘description’ => ”, ‘categories’ => [0 => ‘woo-commerce’], ‘inserter’ => FALSE, ‘featureFlag’ => ‘launch-your-store’, ‘templateTypes’ => ”, ‘source’ => ‘/var/www/cws.eunomia.apexl/web/app/plugins/woocommerce/patterns/coming-soon-store-only.php’]?)…/class-wp-block-patterns-registry.php:309

    This is thrown when using the base WordPress theme

    The install is Bedrock.

    Latest WooCommerce (9.5.1)

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Jonayed (woo-hc)

    (@jonayedhosen)

    Hi @n1ghteyes ,

    Just to clarify, it looks like the issue occurs when using a block theme like Bedrock, but switching to another default block theme like Twenty Twenty-Five resolves the issue.

    This suggests that there might be a problem with how the block pattern is registered, particularly with the content property either missing or not set as a string. Also, are you using any custom or third-party block patterns on your coming soon page?

    However, could you please deactivate other plugins to determine if there’s a conflict causing the issue. If the warning disappears after deactivating a specific plugin, that plugin might be interfering with the block pattern registration.

    Please let us know more details, and we’d be happy to assist you further!

    Thread Starter N1ghteyes

    (@n1ghteyes)

    @jonayedhosen This issue occurs for me when using one of the core themes (i checked), and with all plugins other than WooCommerce turned off.

    Bedrock (also called Roots) is a core variant of WordPress – essentially allowing for composer installations, not a theme – see here: https://roots.io/bedrock/

    Additionally I’m also getting a conflict with Gravity forms, where the edit pages of the forms in Gravity forms don’t work if WooCommerce is enabled (I’ve raised an issue with Gravity forms on this count as well). It appears as though WooCommerce is interfering with enqueued files, though i have not debugged through the process to pinpoint the issue.

    There is no issue with the gravity forms Edit page if WooCommerce is disabled, so the current workaround is to disable WooCommerce, make the form amends required, and re-enable it again. Its workable, but not ideal.

    to the TL;DR here:

    Bedrock is a boilerplate WordPress install, not a theme
    Issue occurs with core theme & WooCommerce the only things enabled
    Also have a conflict with Gravity forms

    Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    Hi @n1ghteyes,

    Thank you for reaching out. We understand the challenges you’re facing with integrating WooCommerce into your Bedrock-based WordPress setup. While Bedrock offers a modern development environment, it introduces complexities that can affect plugin functionality.

    Currently, WooCommerce doesn’t officially support Bedrock configurations. This means we may not be able to provide effective assistance for issues arising specifically from this setup.

    For further guidance, you might consider consulting the Bedrock community or reviewing their documentation: https://discourse.roots.io/

    We appreciate your understanding! Thank you.

    I am also using a Bedrock installation and I encountered the same error after a migration from my development environment to my staging environment. I solved the problem by adding a “” to the woocommerce plugin folder in wp-content, and to all the plugins that need woo to work. After doing this I was able to access my backend, and after viewing the plugins page, I removed the “” previously added.

    I am not clear on the cause of the problem, and it is the first time that this has happened to me.

    I hope this comment can be of help to other users who will have a similar problem.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello pcatapan,

    Thank you for your message.

    I am glad to know that you have found a workaround for this issue.
    I appreciate you for sharing the solution here.

    Have a great day!

    Phil

    (@philsbury)

    If it helps anyone else, I had this issue today and found it was where I’d synced my database from another environment and Woocommerce has added a cache for the block patterns as a transient (woocommerce_blocks_patterns) that lasts for a month.

    I deleted all transients over CLI to fix it with wp transient delete --all --network (it’s a site transient, so --network is required even if you’re not on a multisite).

    Seems the root cause is because the full path to the files is stored in that cache rather than appending ABSPATH when retrieved.

    One to be mindful of when moving databases across environments!

    Plugin Support Reynier (a11n)

    (@reynierc)

    Hi @philsbury

    Thanks for sharing that valuable insight! Your hands-on solution is definitely helpful for others facing similar issues. Clearing transients post-database sync like you did can be a good troubleshooting approach. You can find a guide for using the system tools here. As usual, we recommend backing up your site before using these tools to stay safe.

    If anything else pops up or you have questions, feel free to open a new topic.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP_Block_Patterns_Registry::register was called incorrectly’ is closed to new replies.