WordPress.org

Make WordPress Core

Opened 2 months ago

#53996 new defect (bug)

Custom Coded Template files breaking MetaBoxes

Reported by: juliacramer Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.8
Component: Themes Keywords:
Focuses: administration, template Cc:

Description

We discovered on all of our sites using 5.7 and up, are having issues when swapping between custom made templates. We follow the codex on syntax and nothing unusual is being done on any one template versus another (we have about 15 sites).

The Issue:

When you are in a page editor, using Gutenberg, if you swap templates to any template, it breaks the toggle ability for meta boxes in the content area. When this happens we notice a browser warning about being in JS Quirks mode pointing at the JS for Core (not any of ours). I did remove ALL of our JS to make sure it was not breaking there first. This could be completely un-related though.

What we have tried to do to fix the issue:

Deactivated all plugins
Deactivated one at a time
Updated plugins
Removed Yoast (because it is an asshole)
Renamed entire plugin file so it can't find ANY files
Deleted entire JS library to account for any JS conflicts
Commented out Enqueue scripts
Anything about ACF in functions files I removed
Swapped theme (see notes)

Here is our basic template setup:

<?php
/**
 * Template Name: Locations
 *
 * The template for displaying all pages
 *
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package [name of package]
 */

get_header();
?>

Notes:

We also found that the Twenty-twenty-one theme does fine UNTIL you add a custom page with the codex formatting suggestions like above. As soon as you save and try to swap templates the break happens.

Change History (0)

Note: See TracTickets for help on using tickets.