[wp-trac] [WordPress Trac] #53996: Custom Coded Template files breaking MetaBoxes

WordPress Trac noreply at wordpress.org
Tue Aug 24 21:02:24 UTC 2021


#53996: Custom Coded Template files breaking MetaBoxes
--------------------------------------+-----------------------------
 Reporter:  juliacramer               |      Owner:  (none)
     Type:  defect (bug)              |     Status:  new
 Priority:  normal                    |  Milestone:  Awaiting Review
Component:  Themes                    |    Version:  5.8
 Severity:  normal                    |   Keywords:
  Focuses:  administration, template  |
--------------------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53996>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list