• Resolved tdxdave

    (@tdxdave)


    I am getting this error

    Notice: wp_enqueue_style 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. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in wp/wp-includes/functions.php on line 4231

    This only happens if I activate h5pxapikatchu. WHen I deactivate it, the message goes away.

    It appears the plugin is calling wp_enqueque_scripts at the wrong time.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author otacke

    (@otacke)

    Hi Dave!

    That’s strange. I’ve never encountered that message anywhere. Where does it pop up for you? And version of WordPress and the plugin are you running?

    Best,
    Oliver

    Thread Starter tdxdave

    (@tdxdave)

    Wordpress Version 5.1
    H5PxAPIkatchu version was latest when I tested it a couple of weeks ago 0.3.1

    I checked turning off my theme and other plugins but this one seemed to be the one with the issue.

    Plugin Author otacke

    (@otacke)

    As I mentioned before: I’ve never encountered that message before, but I’ll investigate the issue. Thanks for reporting.

    Thread Starter tdxdave

    (@tdxdave)

    I will see if I can get any more idea of where its happening.

    Plugin Author otacke

    (@otacke)

    I guess you’re running your site in debug mode and I never have, cmp. https://codex.www.ads-software.com/Debugging_in_WordPress

    I’ll enable that mode tomorrow which should put me on the right track.

    Plugin Author otacke

    (@otacke)

    Hi Dave!

    I enabled the debug mode and could confirm the problem and solved the issue in version 3.3 that I have just released. Luckily, even with previous versions, on productive systems you should not have the debug mode enabled. You would neither be bugged nor experience problems as WordPress seems to be quite robust against premature calls to wp_enqueue_style.

    Thanks for reporting!

    Best,
    Oliver

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error wp_enqueue_scripts when activated’ is closed to new replies.