Make WordPress Core

Opened 8 weeks ago

Closed 6 weeks ago

#64133 closed defect (bug) (maybelater)

Template activation: sync migration logic

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

Description

I forgot to include migration logic in https://github.com/WordPress/wordpress-develop/pull/8063. Part of the reason is the I hesitated whether to add it as a permanent action or in upgrade.php, and in the end forgot it.

It's not a critical issue for Beta 1 imo, but it does mean that if someone edited a theme template, or added a new template to the hierarchy (in the database) before upgrading to 6.9 Beta 1, these will not appear on the front-end anymore. When they upgrade again to Beta 2 with the fix, they'll start appearing again. Alternatively testers could manually activate their edited template to make it appear correctly on the front-end again.

The fix is to add the migration logic we have in Gutenberg, which queries existing templates in the database and adds them to the active_templates setting.

Change History (5)

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


7 weeks ago
#1

  • Keywords has-patch added

Adds the migration logic needed for template activation.

Any template is the database that is linked to the current theme should be activated. The existing query can be found at https://developer.wordpress.org/reference/functions/get_block_templates/, it's a 100% copy of that. Also note a few lines down that the status is set to publish when wp_id is not set.

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

#2 @westonruter
7 weeks ago

  • Owner set to ellatrix
  • Status changed from new to assigned

#4 @wildworks
6 weeks ago

  • Milestone changed from 6.9 to 7.0

The template activation feature has been punted to 7.0, so I'd like to change the milestone accordingly.

#5 @ellatrix
6 weeks ago

  • Milestone 7.0 deleted
  • Resolution set to maybelater
  • Status changed from assigned to closed

Let's close this, it will be absorbed into the next attempt.

Note: See TracTickets for help on using tickets.