-
AuthorPosts
-
March 29, 2021 at 7:16 pm #1291136
After updating to WP 5.7 WordPress metaboxes underneath the Gutenberg editor can’t open/close when Enfold is activated. There are no errors in the browser console, no errors in the WP debug log and no other indication as to why.
Only meta boxes in position “standard” appears to be affected. Sidebar metaboxes can collapse as normal.Metaboxes works as they should on all standard themes and with other non-Enfold themes activated.
I have tried to disable all plugins and leave the activated Enfold as the only change to WP standards. When enabling Enfold open/close stops working.Clicking the toggle icon arrow still fires the ajax request that sets the cookie remembering that it should be open, so after clicking it is possible to reload the page and the panel will be open.
The site is in local development and not public, so I can’t provide credentials.
Can you help me resolve?
Enfold version: 4.8.1
Wordpress version: 5.7
PHP: 7.4.10Regards
KasperMarch 29, 2021 at 8:11 pm #1291144To help you debug I can tell you that it seems to be related to the advanced layout builder and by commenting the lines mentioned below out, the layout builder is disabled and it is possible to open/close the panels
enfold/functions.php
line 672
line 679
line 734
line 735Regards
KasperMarch 29, 2021 at 9:15 pm #1291155It appears that your Advanced Layout Builder conflicts with the basic handling of the toggle button of the meta boxes. The classes and aria-attributes aren’t properly set when Enfold is active. Loading below custom script in WP backend makes it work again.
THIS IS NOT A PERMANENT FIX – the bug is still in Enfold
$( “.metabox-location-normal button.handlediv[aria-expanded]” ).each(function( index ) {
$(this).on(‘click’ , function() {
$expanded = $(this).attr(‘aria-expanded’);
if( $expanded == ‘false’ ) {
$( this ).parents(‘.postbox’).removeClass(‘closed’);
$( this ).attr(‘aria-expanded’,’true’);
$( this ).find(‘.toggle-indicator’).attr(‘aria-hidden’,’false’);
} else {
$( this ).parents(‘.postbox’).addClass(‘closed’);
$( this ).attr(‘aria-expanded’,’false’);
$( this ).find(‘.toggle-indicator’).attr(‘aria-hidden’,’true’);
}
});
});April 1, 2021 at 9:31 am #1291724 -
AuthorPosts
- You must be logged in to reply to this topic.