• Resolved Michael Bragg

    (@michaelbragg)


    • PHP: 8.1
    • Plugin Version: 1.3.3
    • WordPress: 6.3.2

    We are getting PHP Notices on the front end of the website for the following:

    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-reporting handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

    Query Monior: PHP Errors

    This appears on all front-end pages across our site. Even those not using any Blocks for CiviCRM.

    The stack trace is showing as:

    wp-includes/functions.php:5905
    _wp_scripts_maybe_doing_it_wrong()
    wp-includes/functions.wp-scripts.php:185
    wp_register_script()
    app/plugins/blocks-for-civicrm/vendor/agencenous/wp-reporting/src/reporting.php:29
    WPReporting\WP_Reporting->__construct()
    app/plugins/blocks-for-civicrm/vendor/agencenous/wp-reporting/src/wp-reporting.php:11
    WPReporting()
    app/plugins/blocks-for-civicrm/vendor/agencenous/wp-reporting/src/wp-reporting.php:16

    We would expect no errors to be shown on any front-end page. More so for those not including any Blocks for CiviCRM blocks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bastien Ho

    (@bastho)

    Hi

    Thank you for using our plugin and reporting the issue.
    We’ll work on a fix very soon.

    Plugin Author Bastien Ho

    (@bastho)

    Version 1.3.4 should fix the issue.

    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_register_script was called incorrectly’ is closed to new replies.