-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Unexpected content changes toggling Classic editor from Text to Visual to Text #4672
Comments
Scenario 2Blank appearing in empty divs. When any HTML comment is added to the content that Gutenberg treats as being a block then toggling between Text and Visual adds an unwanted blank in empty divs.
becomes
|
Scenario 3Classic editor fails to complete loading.
Notes: I think that the unexpected removal of the first comment line is:
My server log shows a lot of file requests being passed to WordPress
I don't understand why |
For Scenario 1 and 2 the workaround/fix seems to be to do the opposite of the logic in
This change has a different side effect. Whereas
After the round trip from Text to Visual and back the content becomes.
|
@bobbingwide Is this issue still valid? |
@tofumatt This could use an e2e test if you want to write one for it. |
From the issue history here it seems this is still relevant, so I can write a failing e2e test and mark it to be skipped, but the actual issue isn't resolved, correct? |
Correct, the actual issue isn't yet resolved. If you're in the mode of writing e2e tests though, I think this would be high-value to have covered. |
This issue has been flagged as high-value by Bluehost for Try Gutenberg rollout. |
This was meant to be at least partially addressed with the following snippet introduced with #2708: Lines 72 to 87 in 322a3fc
In brief testing, we are passing the setting, though apparently it's not enough to stop the forced paragraphs from being introduced. I wonder if these tags may be introduced via TinyMCE's |
Not that crazy. It would certainly lose some convenience, but I imagine it's better to lose the convenience than the data loss (and subsequent Gutenberg-blaming) associated with TinyMCE's destructiveness toward the blocks structure. |
@aduth @azaozz @pento I put together a patch in https://core.trac.wordpress.org/ticket/44617 that modifies TinyMCE 'BeforeSetContent' and 'SaveContent' behavior to strip |
@WordPress/gutenberg-core Per the Slack conversation (on Saturday, sorry for working on the weekend), what's the plan moving forward with regards to opening Gutenberg posts in the Classic Editor? |
Issue Overview
When using the Classic Editor editing a post detected as
Gutenberg
, strange things happen to the content when toggling between Text and Visual.I've seen unwanted paragraphs being created and content disappearing.
This is a backward compatibility problem.
Steps to Reproduce (for bugs)
Expected Behavior
When using the Classic editor you should be able to toggle between Visual and Text without changes to the content.
This unwanted behaviour happens even when the post type being edited does not have 'show_in_rest'.
Current Behavior
Possible Solution
Screenshots / Video
Related Issues and/or PRs
Todos
The text was updated successfully, but these errors were encountered: