Cannot Edit Global Blocks in Pro

I am getting a message that says: “The preview could not load due to the iframe response being incomplete. This is most often related to a plugin conflict, or customizations introducing a PHP error.”

I’ve disabled all plugins and made sure Pro is up to date but still no luck. I’ll include a screenshot and credentials in a private note.

Hi @SJF_me,

Thanks for reaching out!

I just check your website and confirmed your issue but upon investigating the Global Blocks are not accessible, I found out that it is your child theme causing the issue. When I tried to activate the parent theme, we can now edit the Global Blocks. Please note that we don’t support any customization made in the child theme.

Hope that helps.

1 Like

Thank you @marc_a! I didn’t even consider the child theme being the culprit. I’ve narrowed it down to this specific function:

function lets_redirect_404_pages() {
    global $wp_query;
    if ( $wp_query->is_404 ) {
      wp_redirect( get_bloginfo('wpurl'), 301 );
      exit;
    }
}
add_action('template_redirect', 'lets_redirect_404_pages', 1);

Thanks for your assistance!

Quick follow-up question. Should I be avoiding anything in particular in that above code snippet to avoid conflicts with the Pro editor? I can’t seem to see what exactly would’ve caused the issue, and I would like to try to avoid writing any potentially conflicting code in the future.

Hi @SJF_me,

You can add !is_admin() clause into the if to avoid this code run into the Admin section.

if ( $wp_query->is_404 && !is_admin()) 

Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.