Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Sticky posts are not showing up in the right order in a cateogry while using Query Loop block #85827

Open Robertght opened 9 months ago

Robertght commented 9 months ago

Quick summary

Sticky posts are not showing up in the right order when in a category while a Query Loop block.

Steps to reproduce

  1. Create a category
  2. Assign 3 posts to it
  3. Make the oldest one sticky.
  4. Create a page and add the Query Loop block
  5. Set it to display only the category you create in step 1.
  6. Check the results.

What you expected to happen

The order should be:

Post 1 - sticky Post 3 Post 2

What actually happened

The order remained the same, the sticky post being ignored so the order is:

Post 3 Post 2 Post 1

Browser

Google Chrome/Chromium

Context

7355681-zen

Platform (Simple, Atomic, or both?)

No response

Other notes

If I saw this correct, it also happens in the category page, not just the Query loop block.

Found a few other reports:

https://github.com/Automattic/wp-calypso/issues/71294 https://github.com/Automattic/wp-calypso/issues/61785

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, easy to implement

Workaround details

Workaround: Use the Blog Posts block instead or label the posts as "sticky" as a separate category.

github-actions[bot] commented 9 months ago

Support References

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

liviopv commented 9 months ago

📌 REPRODUCTION RESULTS

📌 FINDINGS/SCREENSHOTS/VIDEO After creating a category with 3 posts, one of them sticky, and using a Query Block to display, the block doesn't respect the custom order when filtered by a category:

CleanShot 2023-12-28 at 10 57 30@2x

This is not theme specific, as the problem persisted after switching to TT4.

It's been reported in core already https://github.com/WordPress/gutenberg/issues/51936

📌 ACTIONS