Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Notice: wp_enqueue_script() was called <strong>incorrectly</strong>. #234

Open
gaurav1984 opened this issue Mar 25, 2022 · 1 comment

Comments

@gaurav1984
Copy link

Steps to Reproduce

  1. Enable WordPress Debug
  2. Activate a Non-FSE theme
  3. Go to Apperiance > Widgets
  4. Add a new SyntaxHighlighter Evolved widget
  5. Check debug Log

What I Expected

  • No errors or notices in the debug log

What Happened Instead

  • Got the following PHP notice message
PHP Notice:  wp_enqueue_script() was called <strong>incorrectly</strong>. "wp-editor" script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.8.0.) in /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-includes/functions.php on line 5768
[25-Mar-2022 08:41:12 UTC] PHP Stack trace:
[25-Mar-2022 08:41:12 UTC] PHP   1. {main}() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-admin/widgets.php:0
[25-Mar-2022 08:41:12 UTC] PHP   2. require() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-admin/widgets.php:32
[25-Mar-2022 08:41:12 UTC] PHP   3. require_once() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-admin/widgets-form-blocks.php:69
[25-Mar-2022 08:41:12 UTC] PHP   4. do_action() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-admin/admin-header.php:163
[25-Mar-2022 08:41:12 UTC] PHP   5. WP_Hook->do_action() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-includes/plugin.php:474
[25-Mar-2022 08:41:12 UTC] PHP   6. WP_Hook->apply_filters() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-includes/class-wp-hook.php:331
[25-Mar-2022 08:41:12 UTC] PHP   7. wp_check_widget_editor_deps() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-includes/class-wp-hook.php:307
[25-Mar-2022 08:41:12 UTC] PHP   8. _doing_it_wrong() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-includes/widgets.php:2090
[25-Mar-2022 08:41:12 UTC] PHP   9. trigger_error() /Users/rav/Local Sites/bp-syntaxhighlighter-evolved/app/public/wp-includes/functions.php:5768

PHP / WordPress / SyntaxHighlighter Evolved version

  • PHP 7.4.1
  • WordPress 5.9.2
  • Theme: Twenty Twenty v1.9
  • SyntaxHighlighter Evolved 3.6.1

Browser / OS version

  • N/A

Context / Source

@anarieldesign
Copy link

We have the same problem with our older themes, getting the same notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants