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

Notice: wp_enqueue_script() was called incorrectly #186

Open
brylie opened this issue Oct 11, 2021 · 12 comments
Open

Notice: wp_enqueue_script() was called incorrectly #186

brylie opened this issue Oct 11, 2021 · 12 comments
Assignees
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing feature good first issue New-contributor friendly Hacktoberfest Ideal for Hacktoberfest participation hacktoberfest-accepted help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be fixed soon 🏷 status: label work required Needs proper labelling before it can be worked on
Projects

Comments

@brylie
Copy link
Contributor

brylie commented Oct 11, 2021

When installing the CreativeCommons plugin, on WordPress 5.8, the following notice is displayed:

Notice: 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 /var/www/html/wp-includes/functions.php on line 5663

@brylie brylie added help wanted Open to participation from the community good first issue New-contributor friendly 🟨 priority: medium Not blocking but should be fixed soon ✨ goal: improvement Improvement to an existing feature 💻 aspect: code Concerns the software code in the repository Hacktoberfest Ideal for Hacktoberfest participation hacktoberfest-accepted labels Oct 11, 2021
@cillacode
Copy link
Contributor

hi @brylie i will love too work on this issue thanks.

@brylie
Copy link
Contributor Author

brylie commented Oct 15, 2021

Thanks, @cillacode! I've assigned you to the task.

@cillacode
Copy link
Contributor

@brylie can i know which module this issue is referring to.

@brylie
Copy link
Contributor Author

brylie commented Oct 26, 2021

The issue occurs after installing the Creative Commons plugin. The notice "wp_enqueue_script() was called incorrectly" may not be severe, but it would be good to figure out why we are seeing the warning when WordPress is in debug mode.

@cillacode
Copy link
Contributor

alright @brylie i understand now will look at it

@cillacode
Copy link
Contributor

@brylie i did some research on this issue and the notice displays due to the deps checks in the ./wp-includes/widgets.php file
image

@cillacode
Copy link
Contributor

so i made an edit in the ./wp-includes/default-filters.php file by commenting out the action that displays the error, and when i reloaded my localhost i didn't get the error
image

image

@cillacode
Copy link
Contributor

although i am still in search for the wp-enqueue-script that might have been hooked wrongly. my update for now thanks.

@brylie
Copy link
Contributor Author

brylie commented Oct 27, 2021

Very good :-)

For now, let's disregard this issue and take a closer look at the tasks I shared in project_creativecommons.org

@cc-open-source-bot cc-open-source-bot added 🏷 status: label work required Needs proper labelling before it can be worked on and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Dec 7, 2021
@cc-open-source-bot cc-open-source-bot added 🏷 status: label work required Needs proper labelling before it can be worked on and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Dec 14, 2021
@cc-open-source-bot cc-open-source-bot added 🏷 status: label work required Needs proper labelling before it can be worked on and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Mar 13, 2024
@cc-open-source-bot cc-open-source-bot added 🏷 status: label work required Needs proper labelling before it can be worked on and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Mar 21, 2024
@cc-open-source-bot cc-open-source-bot added 🏷 status: label work required Needs proper labelling before it can be worked on and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Mar 28, 2024
@cc-open-source-bot cc-open-source-bot added 🏷 status: label work required Needs proper labelling before it can be worked on and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing feature good first issue New-contributor friendly Hacktoberfest Ideal for Hacktoberfest participation hacktoberfest-accepted help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be fixed soon 🏷 status: label work required Needs proper labelling before it can be worked on
Projects
Backlog
  
Websites
Development

No branches or pull requests

6 participants