Skip to content

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

Closed

Description

@chrisvanpatten

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

Activity

  1. mcsf commented on Jul 18, 2018

    @mcsf
    Contributor
  2. added
    [Priority] High
    [Feature] Block Transforms
    on Jul 19, 2018
  3. mcsf commented on Jul 19, 2018

    @mcsf
    Contributor

    @chrisvanpatten, thanks for the report.

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

  4. chrisvanpatten commented on Jul 20, 2018

    @chrisvanpatten
    ContributorAuthor

    @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.

  5. 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
  6. mcsf commented on Jul 20, 2018

    @mcsf
    Contributor

    That makes much more sense, thanks for checking!

  7. mcsf commented on Jul 22, 2018

    @mcsf
    Contributor

    Closing in favor of umbrella issue #8119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Block Transforms[Priority] High

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions