“There has been a critical error on this website”
-
Hello, I’m using insert_pages with a custom template on a page I’m having some trouble. From time to time, while editing the page the UPDATE button of wp editor gets stuck in “updating” and next to it it stays the message “saving” but nothing happens. I have to reload the page. Then I get this error:
“There has been a critical error on this website. Please check your site admin email inbox for instructions.”
The only way to be able to edit the page again is to disable insert_pages plugin. Once I do that I can go back to the page, update (save) the latest revision, and THEN activate insert_pages again. Only to have the same problem later on.
The page has a lot of gutenberg blocks, but no plugin blocks apart from yours and wp_forms.
This is the code of my custom template:<?php /** * Template Name: short excerpt */ // Exit if accessed directly. defined( 'ABSPATH' ) || exit; while ( have_posts() ) : the_post(); echo edit_excerpt(get_the_excerpt(), 100); endwhile; function edit_excerpt($excerpt, $limit = 200) { if ($limit > strlen($excerpt)) return $excerpt; if (strpos($excerpt, '.') != true || strpos($excerpt, ',') != true) return $excerpt; $excerpt = explode(' ', $excerpt); $i = 0; foreach ($excerpt as $key => $value) { $i = $i + strlen($value); if ($i >= $limit) { if (strpos($value, '.') == true || strpos($value, ',') == true) { return $return.substr($value, 0, -1).'...'; } } $return .= $value.' '; } } ?>
I don’t know if that’s the problem, or it’s coming from the plugin itself. I’m loading this template in 3 blocks in the page.
I think I’ll manage to finish editing the page and hopefully it’ll be functional from then on, but I’m sending you this message to give you a heads up more than anything. I have the feeling it’s a conflict between insert_pages and the many gutenberg blocks that are in place around the page.
Anyway, thank you very much and all the best!
??
- The topic ‘“There has been a critical error on this website”’ is closed to new replies.