You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Impossible to undo Convert to Blocks when post_content contains a core oEmbed link #7323
Describe the bug
Clicking "Convert to Blocks" successfully converts classic editor content to blocks, and appears to add to the undo history, but clicking "undo" has no result.
In my testing this is caused by oEmbed lines in post_content pointing to WP posts.
To Reproduce
Steps to reproduce the behavior:
Create a post in the Classic Editor with a WordPress oEmbed link, e.g.…
My paragraph
https://www.chrisvanpatten.com/notes-from-wordcamp-halifax-2018
My other paragraph
Open the post in Gutenberg
Open the Classic Editor block's settings menu and select "Convert to Blocks"
Note that the Undo button is enabled
Try to click undo
See nothing happen
Expected behavior
Either this process should be "undoable" or the undo button shouldn't change its state.
Screenshots
Desktop (please complete the following information):
@mcsf I did a bit more testing and I've narrowed it down. The client has WordPress oEmbed links in their post_content, e.g.
My paragraph
https://www.website.com/2018/08/internal-link/
My other paragraph
If I remove those oEmbed lines from the post_content, conversion and undo work fine. With the oEmbeds, you can convert to blocks but not back the other way.
changed the title [-]Impossible to undo Convert to Blocks[/-][+]Impossible to undo Convert to Blocks when post_content contains a core oEmbed link[/+]on Jul 20, 2018
Activity
mcsf commentedon Jul 18, 2018
Related: #6325 (comment)
mcsf commentedon Jul 19, 2018
@chrisvanpatten, thanks for the report.
I can't repro. Do you have content I can use to test this?
chrisvanpatten commentedon Jul 20, 2018
@mcsf I did a bit more testing and I've narrowed it down. The client has WordPress oEmbed links in their
post_content, e.g.If I remove those oEmbed lines from the
post_content, conversion and undo work fine. With the oEmbeds, you can convert to blocks but not back the other way.[-]Impossible to undo Convert to Blocks[/-][+]Impossible to undo Convert to Blocks when post_content contains a core oEmbed link[/+]mcsf commentedon Jul 20, 2018
That makes much more sense, thanks for checking!
mcsf commentedon Jul 22, 2018
Closing in favor of umbrella issue #8119