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

Impossible to undo Convert to Blocks when post_content contains a core oEmbed link #7323

Closed
chrisvanpatten opened this issue Jun 15, 2018 · 5 comments
Labels
[Feature] Block Transforms Block transforms from one block to another [Priority] High Used to indicate top priority items that need quick attention

Comments

@chrisvanpatten
Copy link
Contributor

chrisvanpatten commented Jun 15, 2018

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:

  1. 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
  1. Open the post in Gutenberg
  2. Open the Classic Editor block's settings menu and select "Convert to Blocks"
  3. Note that the Undo button is enabled
  4. Try to click undo
  5. See nothing happen

Expected behavior
Either this process should be "undoable" or the undo button shouldn't change its state.

Screenshots
kapture 2018-06-15 at 16 26 29

Desktop (please complete the following information):

  • OS: macOS High Sierra 10.13.5
  • Browser: Safari 11.1.1
  • Gutenberg Version: 3.0.1
@mcsf
Copy link
Contributor

mcsf commented Jul 18, 2018

Related: #6325 (comment)

@mtias mtias added [Priority] High Used to indicate top priority items that need quick attention [Feature] Block Transforms Block transforms from one block to another labels Jul 19, 2018
@mcsf
Copy link
Contributor

mcsf commented Jul 19, 2018

@chrisvanpatten, thanks for the report.

I can't repro. Do you have content I can use to test this?

@chrisvanpatten
Copy link
Contributor Author

chrisvanpatten commented 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.

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.

@chrisvanpatten chrisvanpatten changed the title Impossible to undo Convert to Blocks Impossible to undo Convert to Blocks when post_content contains a core oEmbed link Jul 20, 2018
@mcsf
Copy link
Contributor

mcsf commented Jul 20, 2018

That makes much more sense, thanks for checking!

@mcsf
Copy link
Contributor

mcsf commented Jul 22, 2018

Closing in favor of umbrella issue #8119

@mcsf mcsf closed this as completed Jul 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Transforms Block transforms from one block to another [Priority] High Used to indicate top priority items that need quick attention
Projects
None yet
Development

No branches or pull requests

3 participants