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

Query Block won't render when placed in 404 Template #30781

Closed
annezazu opened this issue Apr 12, 2021 · 3 comments
Closed

Query Block won't render when placed in 404 Template #30781

annezazu opened this issue Apr 12, 2021 · 3 comments
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

Description

When adding a Query Block to the 404 template, it doesn't show up on the front end of the site. I tried moving it around to different parts of the template but it simply won't render.

Step-by-step reproduction instructions

  1. Setup a site with FSE and TT1 blocks
  2. Open the Site Editor.
  3. Use the Navigation component to go to the 404 template.
  4. Add a query block into the 404 template.
  5. Save changes and view the 404 page.

Expected behaviour

I expect to see the Query block results appear.

Actual behaviour

The Query block doesn't not show up on the front end.

Screenshots or screen recording (optional)

missing.query.block.mov

Front end:

Screen Shot 2021-04-12 at 3 33 43 PM

Editor:

Screen Shot 2021-04-12 at 3 34 01 PM

WordPress information

  • WordPress version: 5.7
  • Gutenberg version: 10.4.0-rc.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? TT1 Blocks

Device information

  • Device: Desktop
  • Operating system: MacOS
  • Browser: Chrome v 89
@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Block] Query Loop Affects the Query Loop Block labels Apr 12, 2021
@ntsekouras
Copy link
Contributor

It has to do with context detection and previews. If we have a Query block with inherit:true to a 404 will not have any posts to output from the loop. If we do set inherit:false , Query will have output.

Related: #30369

@mtias
Copy link
Member

mtias commented Apr 13, 2021

Also something we could do is add some more text when the setting is toggled on describing that it's reading from the current template, and what that template is.

@annezazu
Copy link
Contributor Author

I am going to close this out since it seems as though this is covered in the issue around context detection and it seems wise to consolidate currently.

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

No branches or pull requests

3 participants