Opened 8 weeks ago
Closed 6 weeks ago
#64133 closed defect (bug) (maybelater)
Template activation: sync migration logic
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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
@ellatrix commented on PR #10418:
7 weeks ago
#3
@desrosj Here is some context: https://github.com/WordPress/gutenberg/pull/67125 and https://github.com/WordPress/gutenberg/issues/66950.
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
publishwhenwp_idis not set.Trac ticket: https://core.trac.wordpress.org/ticket/64133