Title: PHP Notice: Function wp_enqueue_script() was called incorrectly
Last modified: August 30, 2023

---

# PHP Notice: Function wp_enqueue_script() was called incorrectly

 *  Resolved [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/php-notice-function-wp_enqueue_script-was-called-incorrectly-2/)
 * Hi, this comes from your plugin when trying to edit widgets page (Gutenberg):
 * [30-Aug-2023 17:41:28 UTC] PHP Notice: Function wp_enqueue_script() was called**
   incorrectly**. “wp-editor” script should not be enqueued together with the new
   widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging
   in WordPress for more information. (This message was added in version 5.8.0.)
   in /home/wp-includes/functions.php on line 5905
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [BasePress](https://wordpress.org/support/users/codesavory/)
 * (@codesavory)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/php-notice-function-wp_enqueue_script-was-called-incorrectly-2/#post-17017640)
 * I tried to reproduce this bug at our end (and also on wp.new) but was unable 
   to. Can you try to trouble shoot this by adding wp query monitor or similar plugin?
   Basically this needs to be troubleshoot since its a unique case.
 * Please send us an email (mentioned on our contact form page) with further details
   if this persists.
 *  Thread Starter [dimal](https://wordpress.org/support/users/dimalifragis/)
 * (@dimalifragis)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/php-notice-function-wp_enqueue_script-was-called-incorrectly-2/#post-17018051)
 * Hi,
 * I have tested also in an emty staging site, same issue. Disabling your plugin,
   the error goes away. Query monitor didn’t provide any more information and there
   is nothing pointing to Basepress.
 * Still with Basepress enabled, the issue happens.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

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

 * ![](https://ps.w.org/basepress/assets/icon-256x256.gif?rev=2817400)
 * [Knowledge Base documentation & wiki plugin - BasePress Docs](https://wordpress.org/plugins/basepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/basepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/basepress/)
 * [Active Topics](https://wordpress.org/support/plugin/basepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/basepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/basepress/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [dimal](https://wordpress.org/support/users/dimalifragis/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/php-notice-function-wp_enqueue_script-was-called-incorrectly-2/#post-17018051)
 * Status: resolved