Make WordPress Core

Opened 7 weeks ago

Closed 7 weeks ago

#64141 closed defect (bug) (fixed)

Template activation: fix unique slug filtering

Reported by: ellatrix's profile ellatrix Owned by: ellatrix's profile ellatrix
Milestone: 6.9 Priority: normal
Severity: normal Version: 6.9
Component: Editor Keywords: has-patch
Focuses: Cc:

Description

Create two templates of the same type (e.g. home). Activating the second one won't take any effect on the front-end, and the template will be marked as "Custom" (instead of "Home").

Change History (2)

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


7 weeks ago
#1

  • Keywords has-patch added

The logic introduced for the unique slug filter in #8063 is incorrect. We should return the desired slug for the wp_template post type.

Testing instructions:

Create two templates of the same type (e.g. home). Activating the second one won't take any effect on the front-end, and the template will be marked as "Custom" (instead of "Home").

Trac ticket: https://core.trac.wordpress.org/ticket/64141

#2 @ellatrix
7 weeks ago

  • Owner set to ellatrix
  • Resolution set to fixed
  • Status changed from new to closed

In 61054:

Template activation: fix unique slug filtering.

The logic introduced for the unique slug filter in [61033] is incorrect. We should return the desired slug for the wp_template post type. This causes any second created template targeting a certain slug to not work correctly.

Developed in https://github.com/WordPress/wordpress-develop/pull/10397.

See #62755.
Fixes #64141.
Props ntsekouras, priethor.

Note: See TracTickets for help on using tickets.