WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 3 days ago

#52111 new defect (bug)

Classic Editor - TinyMCE Visual Page editor not working correctly after updating to version 5.6 or later

Reported by: spikeuk1 Owned by:
Milestone: 5.8 Priority: normal
Severity: major Version: 5.6
Component: Editor Keywords: needs-testing
Focuses: Cc:

Description

I have encountered a problem following updating to version 5.6 (from 5.5.3–en_GB). When I (or other users) try to edit an existing page (or unpublished draft) the editing box in Visual mode is empty.
If you click on the Text tab the content is displayed. Clicking back to Visual mode and the content is now visible.
However, if you edit the content in the Visible tab and save (or preview) the edit is lost.
(There are several reports on https://wordpress.org/support/ of other people experiencing the same issue)

Change History (37)

This ticket was mentioned in Slack in #core by metalandcoffee. View the logs.


4 months ago

#2 @johnbillion
4 months ago

  • Milestone changed from Awaiting Review to 5.6.1

#3 in reply to: ↑ description @spikeuk1
4 months ago

Replying to spikeuk1:

I have encountered a problem following updating to version 5.6 (from 5.5.3–en_GB). When I (or other users) try to edit an existing page (or unpublished draft) the editing box in Visual mode is empty.
If you click on the Text tab the content is displayed. Clicking back to Visual mode and the content is now visible.
However, if you edit the content in the Visible tab and save (or preview) the edit is lost.
(There are several reports on https://wordpress.org/support/ of other people experiencing the same issue)

#4 @spikeuk1
4 months ago

Just to add that this problem is observed using Firefox (64-bit) 84.0 under Win10 and also Chrome.
Spike

Last edited 4 months ago by spikeuk1 (previous) (diff)

#5 follow-up: @johnbillion
4 months ago

Thanks for the report @spikeuk1 ! I've milestoned this for 5.6.1 pending investigation.

#6 in reply to: ↑ 5 @spikeuk1
4 months ago

Replying to johnbillion:

Thanks for the report @spikeuk1 ! I've milestoned this for 5.6.1 pending investigation.

Many thanks!
If there is anything I can do to help push the investigation forward do please shout. My main production server is running WordPress 5.6 and exhibits this problem. My staging server is identical (content, plug-ins, custom theme and templates) except I have left this on 5.5.3 - and works as expected. Would be delighted to to any A-B comparisons on my servers.

Spike

Last edited 4 months ago by spikeuk1 (previous) (diff)

This ticket was mentioned in Slack in #core by metalandcoffee. View the logs.


3 months ago

This ticket was mentioned in Slack in #core by metalandcoffee. View the logs.


3 months ago

This ticket was mentioned in Slack in #core by spikeuk1. View the logs.


3 months ago

#10 @herrvigg
3 months ago

hello,
I’m the maintainer of qTranslate on github and we are also encountering a case that looks related, it is a major issue. This seems to occur quite randomly, but so far I observed it only in combination with WP5.6, Firefox, and the Visual Editor – using the Classic Editor that many, many people still use. Sometimes the problem disappears just by reloading exactly the same page in a different tab…
For reference: https://github.com/qtranslate/qtranslate-xt/issues/931

I observed one interesting event: for some reason (due to WP 5.6 + Firefox?), a listener i have on window.load even does not trigger all the time as it should, though i’m sure the addEventListener is called. If i add another dummy listener on window.load, this one is called all the time, which looks quite insane. Why would a window.load not be triggered?

A few elements grabbed from https://wordpress.org/support/topic/edit-post-page-broken-after-update-to-wp-5-6/:

The issue seems to be that:
wp.oldEditor.initialize() is no longer firing and many plugins/blocks looking for this > event are no longer functioning.

Could this be related to what I observed with window.load not firing properly in some event listener?

Uhh, I just reverted to an older jquery via a plugin – and that fixed it. :/

That seems to confirm something is going wrong with some event.

This post can also be found here: https://wordpress.org/support/topic/edit-post-page-broken-after-update-to-wp-5-6-2/

#11 follow-up: @herrvigg
3 months ago

Could this issue be related to #52046 ? In that case there is a patch in the pipe already.

Last edited 3 months ago by SergeyBiryukov (previous) (diff)

#12 follow-up: @oxpal
3 months ago

I think this is a general issue with the Classic Editor containing outdated JavaScript. Thus it's breaking after updating jQuery with 5.6.

The Classic-Editor support forums are full with issues that I think all come from this. Lot's of plugins break because if it.
For me it is not browser related (breaks in Chrome as well), and not related to the manner I enable the Classic Editor, as any plugin or functions-code causes the issue.

A temporary fix is to use the jQuery Migration Helper https://wordpress.org/plugins/enable-jquery-migrate-helper/.

I personally find Gutenberg unusable (despite giving it a try every couple months), and millions of other users seem to think the same, considering that the "Enable Classic Editor plugin" has 5+ million active installations (plus there are more such plugins and other ways to deactivate Gutenberg). So this is an urgent usability issue for many.

#13 in reply to: ↑ 11 @spikeuk1
3 months ago

Replying to herrvigg:

Could this issue be related to #52046 ? In that case there is a patch in the pipe already.

Thank you for that and for the previous comment.

This (and may other issues) do seem to have the same root cause.

5.6.1 is/was due for release "mid January", which by my calendar is less than a week away - hopefully most problems will be solved.

Last edited 7 days ago by SergeyBiryukov (previous) (diff)

#14 in reply to: ↑ 12 @spikeuk1
3 months ago

Replying to oxpal:

A temporary fix is to use the jQuery Migration Helper https://wordpress.org/plugins/enable-jquery-migrate-helper/.

Thank you for the suggestion. I have installed the plug-in as you suggested and I can confirm that the problem I was seeing has now (once I reverted JQuery to a previous version) has now gone.
This is Firefox - I have not checked with Chrome or anything else yet.

Last edited 3 months ago by spikeuk1 (previous) (diff)

#15 @metalandcoffee
3 months ago

  • Severity changed from normal to major

Just bumping this up to 'major' severity since I think this issue should definitely be resolved in 5.6.1.

Please note that the following tickets may also be related/duplicates: #52050, #52133.

Would recommend closing the other tickets if that is the case.

Last edited 3 months ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


3 months ago

#17 @audrasjb
3 months ago

  • Milestone changed from 5.6.1 to 5.6.2

Given 5.6.1 is slated to next week, let's move this ticket to 5.6.2 to give it some more time.

#18 @spikeuk1
3 months ago

  • Summary changed from Classic Editor - TinyMCE Visual Page editor not working correctly after update to version 5.6 to Classic Editor - TinyMCE Visual Page editor not working correctly after update to version 5.6 & 5.6.1

I updated my WordPress installation from 5.6 to 5.6.1 this morning and can confirm that the problem I reported seven weeks ago is still there.
Still having to use (the excellent) jQuery Migrate Helper set to "Legacy 1.12.4-wp" to permit page editing via the "visual" tab.
As previously stated, I have access to a clone version of my website that I can use to help test any proposed more permanent solutions. Or I can give full admin (temp ;-) ) access to any developer that would like to do more diagnostic testing on a broken website.
Spike

#19 @Marius84
2 months ago

Is there any news about this bug?

#20 follow-up: @audrasjb
2 months ago

For the moment, this ticket still needs a patch. Please note that WP 5.6.2 release candidate is expected for Tuesday, so we'll need someone to reproduce the issue and to propose a patch quickly, otherwise the ticket will be moved to the next milestone.

#21 in reply to: ↑ 20 @spikeuk1
2 months ago

Replying to audrasjb:

For the moment, this ticket still needs a patch. Please note that WP 5.6.2 release candidate is expected for Tuesday, so we'll need someone to reproduce the issue and to propose a patch quickly, otherwise the ticket will be moved to the next milestone.

Good day!
It it very likely that this issue is the same (or at least has the same cause) as in ticket https://core.trac.wordpress.org/ticket/52133 - which is currently flagged as "need testing". As I have noted on this ticket several times, I would be delighted to run tests and or diagnostics on the WordPress installations that I admin.
Regards
Spike

#22 @desrosj
2 months ago

  • Milestone changed from 5.6.2 to Future Release

Thanks for this ticket, and welcome to Trac, @spikeuk1!

My apologies that a contributor has not yet been able to investigate this. It seems that the related tickets noted above have a code example to cause the issue, but it's still not clear where the bug is, or how to fix it.

Since 5.6.2 RC is going to be packaged in a few hours and this one still requires some investigation, I'm going to punt to Future Release.

#23 @spikeuk1
2 months ago

  • Summary changed from Classic Editor - TinyMCE Visual Page editor not working correctly after update to version 5.6 & 5.6.1 to Classic Editor - TinyMCE Visual Page editor not working correctly after update to version 5.6, 5.6.1, & 5.6.2

Have just updated my WordPress installation from 5.6.1 to 5.6.2 and can confirm that the fault reported is still there.
I am temporarily masking the problem using the good ol' jQuery Migrate Helper plugin (set to "Legacy 1.12.4-wp").
Spike

#24 @herrvigg
7 weeks ago

Not sure but this could explain the problem, asynchronous firing with jQuery3: https://github.com/jquery/jquery/issues/3194

With jQuery3 ready handlers fire asynchronously and may be fired after load... there's no guarantee so that can explain some "random" behaviors.

Long story short, the load trigger should never be set in the ready callback but outside. Ideally it should even be avoided when using ready.

#25 @spikeuk1
6 weeks ago

  • Summary changed from Classic Editor - TinyMCE Visual Page editor not working correctly after update to version 5.6, 5.6.1, & 5.6.2 to Classic Editor - TinyMCE Visual Page editor not working correctly after update to version 5.6, 5.6.1, 5.6.2, and 5.7.

Have just updated my WordPress installation from 5.6.2 to 5.7 and can confirm that the fault reported is still there.
I am temporarily masking the problem using the good ol' jQuery Migrate Helper plugin (set to "Legacy 1.12.4-wp").
Spike

#26 follow-up: @floriantactisens
13 days ago

Hi everyone,

I am still stuck with this issue even when I use the JQuery Migrate Helper plugin (either set to "Wordpress default" or "Legacy 1.12.4-wp")
I can no longer add or modify articles or pages since every time I switch from the visual to text tab on the classical editor it adds this code :
"<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>"

Does anyone have news on this issue?

I am still on 5.6.2 version for now.

Thanks in advance,
Florian

#27 in reply to: ↑ 26 @spikeuk1
13 days ago

Replying to floriantactisens:

Hi everyone,

I am still stuck with this issue even when I use the JQuery Migrate Helper plugin (either set to "Wordpress default" or "Legacy 1.12.4-wp")
I can no longer add or modify articles or pages since every time I switch from the visual to text tab on the classical editor it adds this code :
"<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>"

Does anyone have news on this issue?

I am still on 5.6.2 version for now.

Thanks in advance,
Florian

Thank you for the comment (and bumping my ticket up the pile ;-) ), but I believe that the symptoms, cause, and probably fix for your problem is not the same as the issue that this ticket was raised for.
You would be better off creating another ticket as this one seems doomed to never be looked at :(
Spike

This ticket was mentioned in Slack in #core by markparnell. View the logs.


7 days ago

This ticket was mentioned in Slack in #forums by joyously. View the logs.


7 days ago

#30 @Howdy_McGee
7 days ago

I've installed a fresh version of WordPress 5.7 with the Classic Editor plugin installed ( no other plugins, Twenty Twenty One Theme ) and did not run into any of the described issues.

Windows 10
Firefox 87.0
Edge 89.0
Chrome 89.0

PHP 7.3.12
PHP 8.0.3

I've tried publishing new posts and switching between Visual/Text, Saving Drafts, built-in Pages, built-in Posts, Custom Post Type, leaving the post, and coming back to edit the published or draft. All of which functioned as expected. I didn't run into any issues of the editor freezing, content disappearing, or refusing to display text.

Could there be a common Browser Extension, Theme, or other Plugin interfering with how TinyMCE should be displaying?

This ticket was mentioned in Slack in #core by sergey. View the logs.


7 days ago

#32 @SergeyBiryukov
7 days ago

  • Milestone changed from Future Release to 5.8

Moving to the current milestone for more testing and investigation.

#33 @SergeyBiryukov
7 days ago

  • Keywords needs-testing added

#34 @gwwar
7 days ago

If folks are able to reproduce this one, are there any JS errors thrown? A screenshot of Chrome or FF DevTools would be useful.

Does this trigger with some specific post content? Any other plugins running?

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


7 days ago

#36 @yeisonbp
3 days ago

Hi, with our current plugin, Get Awesome Support, each customer and each site we have we see this error as well. Our developers confirmed that this is from the WordPress side. you can install it an replicate it:

  • Install Awesome Support (free)
  • Log in as a support agent role
  • Create a ticket (choose a ticket creator) and click on the blue "open ticket" button.
  • choose the same ticket, add a reply and click on the "reply" button.
  • Now that you have a new ticket and a ticket reply, click on the ticket again and go to the reply. Click on the pencil icon "edit ticket" button and you will see the error message.

Thanks.

#37 @SergeyBiryukov
3 days ago

  • Summary changed from Classic Editor - TinyMCE Visual Page editor not working correctly after update to version 5.6, 5.6.1, 5.6.2, and 5.7. to Classic Editor - TinyMCE Visual Page editor not working correctly after updating to version 5.6 or later
Note: See TracTickets for help on using tickets.