Make WordPress Core

Opened 4 years ago

Closed 5 months ago

Last modified 5 months ago

#53996 closed defect (bug) (worksforme)

Custom Coded Template files breaking MetaBoxes

Reported by: juliacramer's profile juliacramer Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.8
Component: Themes Keywords:
Focuses: administration, template Cc:

Description (last modified by poena)

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
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 (2)

#1 @poena
5 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Hi @juliacramer This type of rude comments are really not necessary.

I was not able to test on WordPress 5.8, but I tested on WordPress 6.7.1 and few versions back and I am not able to reproduce the problem.

I am going to close this ticket. If you can add detailed step-by-step instructions and more information, the ticket can always be reopened.

#2 @poena
5 months ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.