Title: PHP notice: wp_enqueue_script() was called incorrectly.
Last modified: January 11, 2022

---

# PHP notice: wp_enqueue_script() was called incorrectly.

 *  Resolved [garrettm30](https://wordpress.org/support/users/garrettm30/)
 * (@garrettm30)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-notice-wp_enqueue_script-was-called-incorrectly-6/)
 * Hi,
 * I would like to report an error notice that is showing up on my dev copy of the
   site (where of course I have stricter error reporting). When I visit the widget
   page (/wp-admin/widgets.php), WordPress is giving the following error 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 [path_to_wp_install]/wp-includes/functions.
   php on line 5663`
 * I was able to narrow it down to the Modern Footnotes plugin, specifically line#
   707 in the main file modern-footnotes.php. I was also able to reproduce the error
   in a fresh install of WordPress with only Modern Footnotes activated:
 * 1. Install a new local copy of WordPress (current version 5.8.3).
    2. Define 
   constant WP_DEBUG as `true` in wp-config.php. 3. Install and activate Modern 
   Footnotes plugin. 4. Visit the widgets page (path_to_domain/wp-admin/widgets.
   php)
 * Result: The error message I quoted above will be printed to the page and logged
   to the PHP error log.
 * I thank you for sharing the plugin and also for looking into this issue.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-notice-wp_enqueue_script-was-called-incorrectly-6%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘PHP notice: wp_enqueue_script() was called incorrectly.’ is closed to
new replies.

 * ![](https://ps.w.org/modern-footnotes/assets/icon-128x128.jpg?rev=1634981)
 * [Modern Footnotes](https://wordpress.org/plugins/modern-footnotes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/modern-footnotes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/modern-footnotes/)
 * [Active Topics](https://wordpress.org/support/plugin/modern-footnotes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/modern-footnotes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/modern-footnotes/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [garrettm30](https://wordpress.org/support/users/garrettm30/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/php-notice-wp_enqueue_script-was-called-incorrectly-6/)
 * Status: resolved