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 Loop does not display on site if Inherit query from template is enabled #69221

Open
masperber opened this issue Oct 18, 2022 · 11 comments
Open
Labels
[Block] Query Loop Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Enhancement User Report This issue was created following a WordPress customer report

Comments

@masperber
Copy link

Quick summary

When using a Query Loop Block, the Query Loop is hidden from the live site if the Inherit query from template option is selected from the Block settings.

Steps to reproduce

  1. On a site with any theme, add a Query Loop to a blank page.
  2. Choose any of the default templates
  3. Leave the Inherit query from template option enabled
  4. View the live page or preview

What you expected to happen

The Query Loop should display posts as it does in the editor.

What actually happened

The Query Loop does not appear on the live site or preview at all.

Context

Customer report 37468979-hc

Confirmed on my test sites, both Atomic and simple, using Classic, Hybrid, and FSE themes.

Platform (Simple, Atomic, or both?)

Simple, Atomic

Theme-specific issue?

No response

Browser, operating system and other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

Yes, difficult to implement

Workaround details

The Query Loop displays if the Inherit query from template option is disabled. However, this option is enabled by default, which could lead to considerable user confusion.

@masperber masperber added [Type] Bug User Report This issue was created following a WordPress customer report labels Oct 18, 2022
@github-actions github-actions bot added [Platform] Atomic [Platform] Simple [Pri] High Address as soon as possible after BLOCKER issues labels Oct 18, 2022
@cuemarie
Copy link

cuemarie commented Oct 26, 2022

📌 SCRUBBING : RESULT

  • Tested on Simple: Replicated
  • Tested on AT: Replicated
  • Tested on Self-hosted: Replicated
  • Replicable on Core? Yes

📌 FINDINGS/SCREENSHOTS/VIDEO

  • Replicated in all test environments, no matter the theme.

AT Example
Markup on 2022-10-25 at 17:54:38

Markup on 2022-10-25 at 17:54:58

Simple Example
Markup on 2022-10-25 at 17:55:37

Markup on 2022-10-25 at 17:55:54

📌 ACTIONS

  • Marked as Triaged for Quality Squad review

📌 Message to Author/Quality Squad

In a single page there is no much use in having an inherit Query, but instead a custom one.

In general we need to find a way to detect the context a Query lives (page/archive) and set the inherit option accordingly, but this is not yet implemented.

@cuemarie cuemarie added [Type] Enhancement [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Block] Query Loop labels Oct 26, 2022
@arthur791004
Copy link
Contributor

I've also encountered this issue since Gutenberg v13.7 above. The root cause might probably be use_global_query from WordPress/gutenberg#32514. But I'm not sure why it makes the posts become empty if inherit query is enabled

@vinnykaur
Copy link

vinnykaur commented Dec 8, 2022

Another one at zen-5774388

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

Support References

This comment is automatically generated. Please do not edit it.

  • 5820182-zen
  • 6550825-zen
  • 6776963-zen

@rinazrina
Copy link

Another report: #5820182-zen

@jartes
Copy link
Contributor

jartes commented Apr 15, 2023

Another one on 42594789-hc

@jamiepalatnik
Copy link

Another report: 6550825-zd-woothemes

@masperber
Copy link
Author

@cuemarie Do you think we might be able to get an assignee for this? I think it's pretty unfortunate that Query Loops just don't work at all when used by a page unless you disable Inherit query from template, which is on by default. Turning this option off by default, or even better removing it entirely when the block is placed on a page, would be really helpful.

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Aug 18, 2023
@cuemarie
Copy link

cuemarie commented Aug 22, 2023

Hey @masperber ! Looks like the underlying issue here is in Gutenberg Core, so I'm not sure if this is something that can be addressed just within WordPress.com.

Looping in @liviopv though, who might be able to help give this request (as well as the Core counterpart, here: WordPress/gutenberg#30369 ) more support in conversations between .com and .org. Your thoughts or help escalating this would be much appreciated! Thanks for taking a look!

📌 ACTIONS

  • I've lowered the priority label to 'normal' and removed the 'bug' label to make the labeling here more accurate, even though this improvement would be really helpful for lots of customers!

@cuemarie cuemarie added [Pri] Normal Schedule for the next available opportuinity. and removed [Pri] High Address as soon as possible after BLOCKER issues [Type] Bug labels Aug 22, 2023
@Gustavo-Hilario
Copy link

Another report: 6776963-zen

@annezazu
Copy link

Noting that this is related to adding a query loop to a page rather than a template with a fix in progress here: WordPress/gutenberg#65067

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Platform] Atomic [Platform] Simple [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. Triaged To be used when issues have been triaged. [Type] Enhancement User Report This issue was created following a WordPress customer report
Projects
None yet
Development

No branches or pull requests

9 participants