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

Multiple errors when loading TinyMCE in other contexts #7598

Closed
nylen opened this issue Aug 4, 2017 · 21 comments
Closed

Multiple errors when loading TinyMCE in other contexts #7598

nylen opened this issue Aug 4, 2017 · 21 comments
Assignees
Labels
[Feature] AtD [Feature] Contact Form [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@nylen
Copy link
Contributor

nylen commented Aug 4, 2017

First, install Gutenberg.

Then either comment out this workaround or change the Jetpack version number to 5.2.2 or higher. We worked around this first issue in the latest version of Gutenberg (WordPress/gutenberg#2229).

Then, open a new post in Gutenberg and add a "Classic Text" block to it.

First error

This line in the new contact-form code throws an error, and either leaves the editor a totally blank screen or breaks the newly added "Classic Text" block as in this screenshot:

2017-08-04t16 42 22-0400

This is because the script that initializes grunionEditorView is only loaded on the post screen, but TinyMCE (with external plugins) can be loaded in other contexts too, such as Gutenberg.

Second error

Once that is fixed, we see the following additional error in the console, which doesn't appear to be actively breaking anything:

@nylen nylen added [Feature] AtD [Feature] Contact Form [Type] Bug When a feature is broken and / or not performing as intended labels Aug 4, 2017
@nylen nylen added this to the 5.2 milestone Aug 4, 2017
@asg-teleport3
Copy link

I have the same issue

but I resolve it by remove this line form this file https://www.programsgulf.com/wp-content/plugins/jetpack/modules/contact-form/grunion-editor-view.php
if ( ! isset( $current_screen->id ) || $current_screen->base !== 'post' ) { return;

a quick fix would be to remove this code (which would force the javascript stuff to be loaded on all the admin pages).

@nylen nylen changed the title Multiple errors when loading "Classic Text" (full TinyMCE) block in Gutenberg Multiple errors when loading TinyMCE in other contexts Aug 5, 2017
@nylen
Copy link
Contributor Author

nylen commented Aug 5, 2017

Related: #7490

@kraftbj
Copy link
Contributor

kraftbj commented Aug 6, 2017

I think this the same issue as #7600 as well.

@danjjohnson
Copy link

Another case of this in 624508-zen

@danjjohnson
Copy link

And another: 623561-zen (Live Composer)

@cena
Copy link

cena commented Aug 9, 2017

Reported in 614048-zen

Workaround by Black Studio TinyMCE author

@kraftbj
Copy link
Contributor

kraftbj commented Aug 9, 2017

To add to the impacted plugins, VIP Liveblogging plugin.

@cena
Copy link

cena commented Aug 9, 2017

627427-zen

@danjjohnson
Copy link

danjjohnson commented Aug 10, 2017

Black Studio Tiny MCE plugin: #7573

Edit: Workaround here, copied from comment above:
https://wordpress.org/support/topic/5-2-breaks-text-and-tinymce-widgets/#post-9379121

@tyxla
Copy link
Member

tyxla commented Aug 10, 2017

I think a better temp workaround would be to not load any grunion scripts/styles, includng tinyMCE buttons, see the latest revision of this gist for how this can be done: https://gist.github.com/tyxla/1ff7abb1ba484ee25200a41e1df4d0c8/revisions

@lschuyler
Copy link

615710-zen - Reporting this issue with Visual Composer

@georgestephanis
Copy link
Member

@danjjohnson @tyxla: Simplest workaround for users will be to just install this plugin --

https://github.com/georgestephanis/disable-grunion-editor-view

@tyxla
Copy link
Member

tyxla commented Aug 11, 2017

Nice one @georgestephanis. That'll probably be the case for most of the users.

Still, in case folks want to use the contact form editor, they'll probably need to go with the other workaround, which doesn't fully disable it, but just improves it to not load its scripts unless necessary.

@NicoleA
Copy link

NicoleA commented Aug 15, 2017

I've added the filter but it didn't seem to solve the problem for me. I see a fix is moving along, and I thank you for that.

@seejacobscott
Copy link

Reported here: 638743-zen. Let them know a fix is in place and should be shipped with next version.

@lamdayap
Copy link

Reported here 639661-zen conflicting with event espresso plugin

@lamdayap
Copy link

lamdayap commented Sep 1, 2017

adding 660475-zen - so we can keep track of users to notify after the fix is shipped.

@lamdayap
Copy link

lamdayap commented Sep 1, 2017

660598-zen

@seyfro
Copy link

seyfro commented Sep 2, 2017

Any idea when a fix/new release will be shipped? this issues is breaking a core functionality of our plugins (see #7600 reported about a month ago) and we fear that we will are likely to loose a lot of new users which do not turn to our support so that we can inform them about the available workarounds :-/

@jeherve
Copy link
Member

jeherve commented Sep 7, 2017

@robertharm The fix was released this past Tuesday. Everything should now work. Let us know if you continue to experience issues with the current version of Jetpack.

@seyfro
Copy link

seyfro commented Sep 9, 2017

thanks - issues cannot be reproduced anymore since the jetpack update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] AtD [Feature] Contact Form [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests