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

FSE: Query block encounters an error with sample content in Site Editor #29051

Closed
chthonic-ds opened this issue Feb 16, 2021 · 5 comments
Closed
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Bug An existing feature does not function as intended

Comments

@chthonic-ds
Copy link
Contributor

Description

A fresh WordPress install includes a Hello World sample post, and this post is part of the content returned inside a Query block in the Site Editor. The block containing this content displays the error, "This block has encountered an error and cannot be previewed."

Step-by-step reproduction instructions

  1. Install WordPress 5.6.1 with TT1 Blocks theme
  2. Install Gutenberg 9.9.3
  3. Visit Site Editor
  4. Observe an error notice returned by the block containing content from the Hello World post.

Expected behaviour

Content returned by the Query block should be available.

Actual behaviour

The block displays the "this block has encountered an error and cannot be previewed" message.

Screenshots or screen recording (optional)

image

WordPress information

  • WordPress version: 5.6.1
  • Gutenberg version: 9.9.3
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes, TT1 Blocks

Device information

  • Device: Desktop
  • Operating system: Windows 10
  • Browser: 88.0.4324.150, Firefox Developer 86.0b9
@talldan talldan added [Block] Query Loop Affects the Query Loop Block [Feature] Full Site Editing Needs Testing Needs further testing to be confirmed. labels Feb 17, 2021
@ntsekouras
Copy link
Contributor

Hey @chthonic-ds - thanks for reporting this!

I couldn't reproduce this. Is this still happening?

@chthonic-ds
Copy link
Contributor Author

chthonic-ds commented Feb 25, 2021

Thanks for taking a look, @ntsekouras !

Yes, I'm still seeing this issue, though there's now a slightly different path to see the error after updating to the latest WP core, Gutenberg and TT1 Blocks theme.

  • Install WordPress 5.6.2
  • Install and activate TT1 Blocks 0.4.4
  • Install and activate Gutenberg 10.0.2
  • Visit Site Editor
  • Focus the Query block
  • Observe an error notice returned by the block containing content from the Hello World post.

The Hello World! post is initially saved in a Classic Block. When I convert it to a Paragraph block, the issue is gone.

Console error before converting the Classic Block (neglected to add in the initial report, apologies):

TypeError: Cannot read property 'tinymce' of undefined
    at index.js?ver=dcc947abe08a21aa9d1ca40da9585bb5:58
    at Bh (react-dom.min.de439aae.js:126)
    at Dj (react-dom.min.de439aae.js:162)
    at unstable_runWithPriority (react.min.e713ea3b.js:25)
    at Da (react-dom.min.de439aae.js:60)
    at xb (react-dom.min.de439aae.js:162)
    at Te (react-dom.min.de439aae.js:146)
    at react-dom.min.de439aae.js:61
    at unstable_runWithPriority (react.min.e713ea3b.js:25)
    at Da (react-dom.min.de439aae.js:60)

@chthonic-ds
Copy link
Contributor Author

Struck me as odd that a Classic block would be used in Hello World!, and I think I know now why I'm seeing this behaviour.

I was testing with an old version of Laragon and this was initially installing an earlier version of WordPress which was then updated to the latest. The initial WordPress installation is where the Classic block was coming from. Testing again with 5.6.2 installed from the outset, a regular Paragraph block is used and the error doesn't occur.

I guess this means the actual issue here is that the Classic block generates an error in the Query block. I can't see an open issue for this but will hold off creating one until someone else confirms.

@david-szabo97
Copy link
Member

This PR might be the fix: #27059

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Jun 8, 2021
@Mamaduka Mamaduka linked a pull request Jun 8, 2021 that will close this issue
6 tasks
@skorasaurus
Copy link
Member

Hi, I'm not able to reproduce this; believe it was fixed in #48938 ; please reopen if you're still experiencing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants