Make WordPress Core

Opened 2 years ago

Closed 23 months ago

#56902 closed defect (bug) (fixed)

Creating taxonomy templates for specific terms are wrongly displayed as not found

Reported by: franz00's profile franz00 Owned by: desrosj's profile desrosj
Milestone: 6.1.1 Priority: normal
Severity: normal Version: 6.1
Component: Editor Keywords: has-screenshots needs-testing has-patch fixed-major
Focuses: Cc:

Description

Summary
Tag and category template creation for specific item are wrongly displayed as not found despite being successfully created. This doesn't happen to all items tag/category templates creation or other template options.

Steps to reproduce

  1. Activate Twenty Twenty-Three theme.
  2. Create a new tag or category template for specific item.
  3. Observe the success notification at the bottom and Not Found: (template_name) at the top toolbar or at the template list.

Expected result
The successfully created templates should not be reported as not found.

Accompanying images
Template editor https://i.imgur.com/SkXaUm8.png
Template list https://i.imgur.com/A7tYqsj.png

Change History (13)

#1 @franz00
23 months ago

Update: the problem still persist on the 6.1 rc3.
Here's the reference gif image. https://imgur.com/a/bcgRIkS

#2 @mikachan
23 months ago

Thanks for reporting this. I've opened an issue upstream: https://github.com/WordPress/gutenberg/issues/45374

This ticket was mentioned in Slack in #core by desrosj. View the logs.


23 months ago

#4 @desrosj
23 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Going to close this out as reported-upstream. This likely can only be solved through changes to the block editor itself and not within themes.

#5 @franz00
23 months ago

Thank you for reporting it to upstream.

This ticket was mentioned in PR #3564 on WordPress/wordpress-develop by @jorgefilipecosta.


23 months ago
#6

  • Keywords has-patch added

Fixes: https://github.com/WordPress/gutenberg/issues/45374, https://core.trac.wordpress.org/ticket/56902.

This issue does not affect the Gutenberg plugin and is a core-specific regression introduced in
https://github.com/WordPress/wordpress-develop/commit/628e83d157dd7e987c3c58c69b9a7c2bc173e2a9.
According to the docs https://developer.wordpress.org/reference/classes/wp_term_query/query/ WP_Term_Query:->query( string|array $query ) returns [WP_Term][]|int[]|string[]|string, and we were retrieving an inexistent object property terms making it always empty and look like the taxonomy did not exist.
This PR fixes the issue.

This ticket was mentioned in Slack in #core by mikachan. View the logs.


23 months ago

#8 @JeffPaul
23 months ago

  • Milestone set to 6.1.1
  • Resolution reported-upstream deleted
  • Status changed from closed to reopened

#9 @jorgefilipecosta
23 months ago

In 54751:

Fix: Category specific templates always appear as not found.

According to the docs in developer.wordpress.org/reference/classes/wp_term_query/query WP_Term_Query:->query( string|array $query ) returns WP_Term[]|int[]|string[]|string, and we were using an inexistent object property terms making it always empty and look like the taxonomy did not exist.

Props mamaduka, mikachan, ockham, franz00.
See #56902.

#11 @SergeyBiryukov
23 months ago

  • Keywords fixed-major added

#12 @desrosj
23 months ago

  • Component changed from Bundled Theme to Editor
  • Summary changed from Twenty Twenty Three: Tag and category template creation for specific items are wrongly displayed as not found despite being successfully created to Creating taxonomy templates for specific terms are wrongly displayed as not found

This is not specifically related to themes, so I'm reclassifying it to the Editor component.

#13 @desrosj
23 months ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from reopened to closed

In 54767:

Fix: Category specific templates always appear as not found.

According to the docs in developer.wordpress.org/reference/classes/wp_term_query/query WP_Term_Query:->query( string|array $query ) returns WP_Term[]|int[]|string[]|string, and we were using an inexistent object property terms making it always empty and look like the taxonomy did not exist.

Props mamaduka, mikachan, ockham, franz00.
Merges [54751] to the 6.1 branch.
Fixes #56902.

Note: See TracTickets for help on using tickets.