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

Edited Reusable Block Bug Breaks Post/Page and Calypso - Site - Posts/Pages (no posts/pages appear) #38929

Closed
scosgro opened this issue Jan 18, 2020 · 11 comments
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Closed] Duplicate Duplicate of an existing issue. [Goal] Gutenberg Working towards full integration with Gutenberg [Type] Bug When a feature is broken and / or not performing as intended

Comments

@scosgro
Copy link

scosgro commented Jan 18, 2020

I'm not 100% sure about how the user whose site this bug was affecting reached this conclusion, but I've found a way to replicate the bug (or something very much like it).

Steps to reproduce

  1. Starting on a WordPress.com Simple Site
  2. Create a post. Add a Paragraph Block with some text in it.
  3. Make that block a Reusable Block. Give it a name (just to distinguish it). Save. Publish the post. Open the post in a new tab.
  4. Create a new post.
  5. Click to add a block, go to Reusable Blocks - Manage All Reusable Blocks. At the moment, you need to open this in a new tab. Opening it in the same window will fail. See Manage Reusable Blocks Link Fails in Calypso. New Tab Opens in Calypso-ify.  #38928 (discovered while investigating this bug).
  6. Hover over the block you've created, and click Classic Editor.
  7. When editing the block in the classic editor, make the block refer to itself by adding:

<!-- wp:block {"ref":BLOCK-NUMBER-HERE} /-->

  1. The Block Number can be found in the URL.
  2. Update.
  3. Refresh the post this reusable block appears on. The post will be completely broken.
  4. The post will also fail to appear in Calypso under Site - Posts. It will still appear in WP-Admin.
  5. For the user's site, all posts disappeared from Calypso. I haven't been able to replicate this, though it does break Calypso in some way (step 11).

What I expected

I'm not totally sure the workflow the user went through to get to this point. They didn't seem like they were too sure either. There has to be an easier way to do it, but I haven't found it. This was only the way I could replicate it based on what I saw on their site.

Expected the reusable block to not break the post/Calypso.

What happened instead

The Block breaks the post/Calypso once updated in this way.

Browser / OS version

All.

Screenshot / Video

.gif is a bit long, but shows the full workflow, including the aftermath.

reusableblockbug
https://cloudup.com/co-14A0XSOg

Context / Source

#reallife #painpoint.

#user-report

@scosgro scosgro added the [Type] Bug When a feature is broken and / or not performing as intended label Jan 18, 2020
@AtrumGeost
Copy link
Contributor

Got a similar case here 2649686-zen

@scosgro
Copy link
Author

scosgro commented Jan 30, 2020

Another one in 3124526-hc

@scosgro scosgro changed the title Edited Reusable Block Bug Breaks Post and Calypso - Site - Posts (no posts appear) Edited Reusable Block Bug Breaks Post/Page and Calypso - Site - Posts/Pages (no posts/pages appear) Jan 30, 2020
@desnum
Copy link

desnum commented Feb 4, 2020

Another similar case in 18426919-hc:
No pages show in Calypso, though they're there in WP Admin.

@kriskarkoski
Copy link
Contributor

@mrfoxtalbot I'm not following. Was that meant for another issue perhaps?

@mrfoxtalbot
Copy link

I am sorry, @kriskarkoski! I meant to add this comment on a different issue, please disregard my comment.

@kriskarkoski kriskarkoski added [Goal] Gutenberg Working towards full integration with Gutenberg Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions labels Mar 12, 2020
@kriskarkoski
Copy link
Contributor

Confirmed this issue is still present and self-referencing also makes the Reusable Blocks option disappear when adding blocks on a new post and saving to fail on the post if you open the editor, edit the reusable block to self-reference, and then try to save a post with it present.

I also tested on a core install and was able to reproduce issues there, specifically fatal errors due to timeouts in /wp-includes/class-wp-block-parser.php on line 417 and /wp-includes/class-wp-block-parser.php on line 417.

@scosgro Do you want to open the issue on https://github.com/WordPress/gutenberg/issues?

@scosgro
Copy link
Author

scosgro commented Mar 24, 2020

Posted here: WordPress/gutenberg#21117

@katiebethbrown
Copy link

Another report here:
3290676-zd-woothemes

@cathymcbride
Copy link
Contributor

This is a duplicate of WordPress/gutenberg#18704. I'm going to leave it open to make it easier to find.

@kriskarkoski
Copy link
Contributor

Another case in 3655674-zen

@synora
Copy link
Contributor

synora commented Jan 27, 2021

WordPress/gutenberg#18704 has been closed.
I'll close this one in favor of #49007

@synora synora closed this as completed Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Closed] Duplicate Duplicate of an existing issue. [Goal] Gutenberg Working towards full integration with Gutenberg [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

8 participants