-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Legacy widget: Text widget results in javascript error #33203
Comments
Testing this on the current 5.8 branch or WordPress |
I can reproduce this on WP 5.7.2 with the latest from this repo, but not on 5.9-alpha-51272-src with or without the Gutenberg plugin. |
Moved this to the post-5.8 grab bag ("Maybe later") as it's not affecting 5.8. |
I believe the problem is that the Text Widget is using trying to call Seems like we already have solved this before by reassigning it to |
I think it is affecting 5.8. There may be more problems here, but one originates in Jetpack when it is enabled in the latest WP 5.8 version, with or without the gutenberg plugin. Specifically, here:
On the surface, this could be seen as a Jetpack problem so let me cc @jeherve and @kraftbj. If we look deeper, however, this could be a common situation among many plugins and we should address it somehow. A somewhat naive solution could be to update |
I just had the worst idea ever, but it could just solve this issue once and for all :D The problem is that we have two different sets of expectations in regard to what resides under the name While the rest of the code expects to find a legacy editor object with a few specific keys available: What if, instead of trying to match the right object with the right code, we just fuse the two together? So |
Sharing for visibility. A quick search on WordPress plugin directory for wp.editor.initialize brings up a lot of results. Not all of these will spin up tinymce in widget screen. But two popular ones seem too. SiteOrigin Widgets Bundle and Page Builder by SiteOrigin . SiteOrigin Widgets Bundle with 900k downloads. Not to mention Jetpack 5+ million downloads. Worth testing against Jetpack and these plugins.... |
Great idea checking the plugin directory @spacedmonkey! This shows that we need a solution that's compatible with both the widgets editor and all the existing code. I just proposed one in #33228 |
This is a related issue: https://core.trac.wordpress.org/ticket/53569 I wonder if we could add code to Core that warns against enqueueing |
Here's a PR proposing a very similar approach, but without touching the |
Let's go with WordPress/wordpress-develop#1481. Closing this. |
Description
The legacy text widget, use the tinymce error. If you have a text widget from the old widget editor then go to the new widget screen, this generates a javascript error.
Step-by-step reproduction instructions
Expected behaviour
No error message and the tinymce editor should be displayed.
Actual behaviour
Screenshots or screen recording (optional)
Code snippet (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: