Make WordPress Core

Opened 2 years ago

Closed 5 weeks ago

#55124 closed defect (bug) (wontfix)

Twenty Twenty-Two: Changing post order leads to bug with "Post Content" block

Reported by: archikaroton's profile archikaroton Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.9
Component: Bundled Theme Keywords: close
Focuses: Cc:

Description

I'm using WordPress 5.9 with the Twenty Twenty-Two theme.

In the Editor, I'm modifying a custom category template (e.g. category-test.php). Within the "Query Loop" block I insert a "Post Content" block. I then change the sorting order of the posts by using the block settings, deactivating "Inherit default layout" and changing "Order by" to "Oldest to newest".

Now, when viewing the category page, for the first post it always shows the "Post Content" of the last post. This happens with any category and any number of posts I've tried so far. It also happens when I try to change the sorting order via code in functions.php.

Have a nice day!

Attachments (1)

Screenshot_2022-02-09.png (149.5 KB) - added by archikaroton 2 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
2 years ago

  • Summary changed from Changing post order leads to bug with "Post Content" block to Twenty Twenty-Two: Changing post order leads to bug with "Post Content" block

#2 @poena
3 months ago

  • Keywords close added

Hi

I have tested this with the following setup:
Twenty Twenty-Two version 1.6
WordPress 6.4.3

Create a new category called test and add a few posts to the category.

In the Site Editor > Templates, select "Add new"
Then "Category archives" and "For a specific item" and "test".
Now in the modal that shows, choose a pattern to use in the template.

Select the query block.
There is no option called "inherit default layout". It must have been renamed or removed in the past two years.

  • If the option "Inherit query from template" is turned off, the archive will stop working unless you also add a filter.

Open the filters panel and select taxonomy, then enter the name of the category (test) in the category field.

Change order by to "Oldest to newest".

Save.

In my test, the posts, both the title and content, are displaying in the correct order in the editor and the front.

I think this ticket should be closed as fixed.

#3 @karmatosed
5 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I also agree with you @poena on this. I am going to therefore close this ticket. We can always reopen if someone would like that in the future, for now thank you for the collaboration on this.

Note: See TracTickets for help on using tickets.