Make WordPress Core

#64133 closed defect (bug) (maybelater)

Template activation: sync migration logic

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

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.


13 months 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
13 months ago

  • Owner set to ellatrix
  • Status new → assigned

#4 @wildworks
12 months ago

  • Milestone 6.9 → 7.0

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

#5 @ellatrix
12 months ago

  • Milestone 7.0
  • Resolution → maybelater
  • Status assigned → closed

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

Note: See TracTickets for help on using tickets.