Skip to content

Same queryId for all Query Loops #56902

Closed

Description

@scrobbleme

Description

We are migrating a site with multiple CPT to a Gutenberg-based theme and are using multiple Query Loops within single template.

Unfortunately, all loops have the same queryId attribute. This i.e. happens when duplicating the Loop-Block

Problems with this:

  • Paging is not working, as every loop is paged
  • (scrolling directly to the loop is not working, as all share the same id)

Personally, I would prefer to enable the ID field on the block and allow any Id, as there is no need to just allow a numeric one.

Step-by-step reproduction instructions

  1. Create a single template with a query loop block
  2. Duplicate the query loop block
  3. → you can see in the HTML, that both have the same ID.

Screenshots, screen recording, code snippet

image

Environment info

  • Latest WordPress
  • Latest Gutenberg-Plugin

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    on Dec 8, 2023
  2. github-actions commented on Jan 12, 2024

    @github-actions

    Hi,
    This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
    Thanks for helping out.

  3. added
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Jan 12, 2024
  4. scrobbleme commented on Jan 12, 2024

    @scrobbleme
    Author

    Hi, This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.

    It is still problem ;)

  5. removed
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Jan 13, 2024
  6. skorasaurus commented on Jun 13, 2024

    @skorasaurus
    Member

    experiencing this on GB 18.5

    occurs not just in templates; but even a post (of post type page) that has displays multiple query loops on it.

    However, I was able to work around the issues @scrobbleme described by manually changing the queryid of one of the loops in the code editor.

  7. skorasaurus commented on Jun 13, 2024

    @skorasaurus
    Member

    There is a duplicate issue of it at #46079 although that issue has an ambiguous issue title so keeping this one open

    I found another issue writing about this at #55823 ; so I'm closing this and you can follow its progress by subscribing to that issue.

  8. added
    [Status] DuplicateUsed to indicate that a current issue matches an existing one and can be closed
    on Jun 13, 2024
  9. skorasaurus commented on Jun 13, 2024

    @skorasaurus
    Member

    I found this issue also reported at #55823 with a clearer title and you can follow its progress there.

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

    [Block] Query LoopAffects the Query Loop Block[Status] DuplicateUsed to indicate that a current issue matches an existing one and can be closed[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions