Critical error on this website
-
Hi,
After upgrading kadence block plugin to 3.1.12 version, I’m getting a message “Critical error on this website”.
I’m unable to use kadence blocks in my new post or pages.
Here’s is the screenshot for your reference https://ibb.co/pf46nJ4
Thanks
The page I need help with: [log in to see the link]
-
Hello @akshay0101
This isn’t an issue I’ve seen others report with the update. Do you see any PHP errors in your site error logs? If you don’t have the debug logs enabled, please enable them per the following WordPress documentation. Unfortunately, the error alone doesn’t provide enough information to determine where a bug might exist.
Debugging in WordPress
Hi there,
Here’s the Error log
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /home1/rpindust/public_html/inductiekookplaat/wp-includes/block-supports/custom-classname.php:48 Stack trace: #0 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-block-supports.php(119): wp_apply_custom_classname_support(Object(WP_Block_Type), NULL) #1 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-block-supports.php(176): WP_Block_Supports->apply_block_supports() #2 /home1/rpindust/public_html/inductiekookplaat/wp-content/plugins/kadence-blocks/includes/blocks/class-kadence-blocks-singlebtn-block.php(243): get_block_wrapper_attributes(Array) #3 /home1/rpindust/public_html/inductiekookplaat/wp-content/plugins/kadence-blocks/includes/blocks/class-kadence-blocks-abstract-block.php(174): Kadence_Blocks_Singlebtn_Block->build_html(Array, ”, ”, Object(WP_Block)) #4 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-block.php(258): Kadence_Blocks_Abstract_Block->render_css(Array, ”, Object(WP_Block)) #5 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-block.php(244): WP_Block->render() #6 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-block.php(244): WP_Block->render() #7 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-block.php(244): WP_Block->render() #8 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-block.php(244): WP_Block->render() #9 /home1/rpindust/public_html/inductiekookplaat/wp-includes/blocks.php(1133): WP_Block->render() #10 /home1/rpindust/public_html/inductiekookplaat/wp-includes/blocks.php(1171): render_block(Array) #11 /home1/rpindust/public_html/inductiekookplaat/wp-includes/class-wp-hook.php(310): do_blocks(‘<!– wp:paragra…’) #12 /home1/rpindust/public_html/inductiekookplaat/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘<!– wp:paragra…’, Array) #13 /home1/rpindust/public_html/inductiekookplaat/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1864): apply_filters(‘the_content’, ‘<!– wp:paragra…’) #14 /home1/rpindust/public_html/inductiekookplaat/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(569): WP_REST_Posts_Controller->prepare_item_for_response(Object(WP_Post), Object(WP_REST_Request)) #15 /home1/rpindust/public_html/inductiekookplaat/wp-includes/rest-api/class-wp-rest-server.php(1188): WP_REST_Posts_Controller->get_item(Object(WP_REST_Request)) #16 /home1/rpindust/public_html/inductiekookplaat/wp-includes/rest-api/class-wp-rest-server.php(1035): WP_REST_Server->respond_to_request(Object(WP_REST_Request), ‘/wp/v2/pages/(?…’, Array, NULL) #17 /home1/rpindust/public_html/inductiekookplaat/wp-includes/rest-api.php(545): WP_REST_Server->dispatch(Object(WP_REST_Request)) #18 /home1/rpindust/public_html/inductiekookplaat/wp-includes/rest-api.php(2911): rest_do_request(Object(WP_REST_Request)) #19 [internal function]: rest_preload_api_request(Array, ‘/wp/v2/pages/43…’) #20 /home1/rpindust/public_html/inductiekookplaat/wp-includes/block-editor.php(743): array_reduce(Array, ‘rest_preload_ap…’, Array) #21 /home1/rpindust/public_html/inductiekookplaat/wp-admin/edit-form-blocks.php(77): block_editor_rest_api_preload(Array, Object(WP_Block_Editor_Context)) #22 /home1/rpindust/public_html/inductiekookplaat/wp-admin/post.php(187): require(‘/home1/rpindust…’) #23 {main} thrown in /home1/rpindust/public_html/inductiekookplaat/wp-includes/block-supports/custom-classname.php on line 48
There has been a critical error on this website. Please check your site admin email inbox for instructions.
Hello @akshay0101
Thank you for providing the stack trace. I still haven’t determined the cause. However, the error includes a Kadence button. First, please follow the steps in our troubleshooting article, including clearing your cache and checking for plugin conflicts.
Can you explain how this problem presents itself? Do you get the error when you update the plugin? Or does it happen when you try to save a page or add a block? Also, what version of PHP does your site use? Also, are you using SVGs inside of a button somewhere?
I followed the troubleshooting guide above, yet the problem isn’t resolved. This problem occurs when I try to post a new article. What I generally do is open any previous post/page and copy the entire product block (please check this URL https://www.inductiekookplaat.org/beste-inductie-kookplaat-90-cm/) which contains a image, tables and Kadence blocks buttons.
For past two weeks, I can only copy and paste less than 3 product blocks in my post. This problem occurs when I paste more than 3 or 4 blocks into my post. When I paste more than three or four product blocks, I get a weird message at the top of my WordPress screen saying “Update Failed”. And for your information, the Kadence block buttons in the fourth block turn blue when this error occurs. I can neither save or open the post as I get “Critical error on this website” message. I can open the post (auto saved draft) only when I turn off the kadence block. I hope I was able to explain the problem.
Currently I’m using php version 8.2 and I’m not using any svgs inside buttons.
Product block screenshot: https://ibb.co/0KQd9t4
Hello @akshay0101
Thanks for providing more information. From what I understand, you have a problem in which you see a critical error and can’t save or open the post afterwards. This happens when you copy and paste several blocks into your post.
I haven’t heard this reported by others, nor can I reproduce it on my test site. Could you help me try to recreate the problem? You mentioned you copy product blocks, but I don’t see a specific product block when I look at your site. Instead, I see rows of content that must be the products you’re talking about. Are you copying and pasting those Row Layout blocks from other pages?
Are there any blocks inside of the row layouts that are from Generate press? Does the problem happen when you copy and paste content that doesn’t include generate press blocks?
I call it a product block to simplify things. Actually, the entire block (product block) is made using Kadence blocks row layout. Most of the times, I copy and paste the block into the new post/page from any of the previous published pages.
In that block, I’m using Kadence buttons instead of generatepress blocks or buttons.
The “Critical error on this website” problem disappers when I turn off kadence blocks plugin. In fact, I can edit and save the post once the kadence blocks plugin is deactivated.
Hello @akshay0101
Unfortunately, I still can’t recreate the problem when I try copying and pasting different groups of content from post to post. I recommend you contact Kadence support directly and send a free support ticket. The problem appears unique to your installation, and support will likely ask for temporary access to review the issue if you’d like it to be investigated.
“Support will likely ask for temporary access to review the issue if you’d like it to be investigated.”
Moderator note: @ghernkadence
Please do not suggest asking for admin access here.
Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.
If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.
Please be aware that repeatedly asking for credentials will result in us escalating this to the plugins team.
It’s never necessary to do that. Here’s why.
There are many ways to get information you need and accessing the user’s site is not one of them. That’s going too far.
- Ask for a link to the https://pastebin.com/ or https://gist.github.com log of the user’s web server error log.
- Ask the user to create and post a link to their
phpinfo();
output. - Ask the user to install the Health Check plugin and get the data that way.
- Walk the user through enabling WP_DEBUG and how to log that output to a file and how to share that file.
- Walk the user through basic troubleshooting steps such and disabling all other plugins, clear their cache and cookies and try again.
- Ask the user for the step-by-step on how they can reproduce the problem.
You get the idea.
Volunteer support is not easy. But these forums need to a safe place for all users, experienced or new. Accessing their system that way is a short cut that will get you into real trouble in these forums.
- This reply was modified 1 year, 2 months ago by Steven Stern (sterndata).
I had the same problem and this is what I did to fix it, I tried a lot of different solutions but none of them worked, until I cleaned all the Cookies and any other information from the Browser, that did the magic. I am using Google Chrome.
@akshay0101 did you figure out what was going on? I’m having the exact same stacktrace on a fresh install of Kadence.
- This reply was modified 1 year ago by rajivraman.
I was able to get around this by adding some temporary code to the failing line in custom-classname.php that bypassed the null. Then the page loaded. Then I removed the temporary code and the page still loaded! Smells like a strange initialization race condition.
I tried everything else: disabling all other plugins, reinstalling all Kadence themes/plugins. Nothing worked except for the above. As soon as the Kadence Blocks plugin was enabled, the page bombed. If anyone else runs into this, I suggest doing the above or just doing a fresh WP reinstall.
Scratch that, I needed to reinstall Kadence and the second time, my hack did not work. I have no idea why I’m getting the stack trace above on a fresh install.
I ended up using Duplicator to package up a Kadence install on my localhost and pushing it up to my server. Not ideal.
We were getting this same error on our ecommerce site after adding Kadence buttons to our Terms & Conditions page, which gets added to purchase emails but isn’t loaded in the browser to the end user. Those emails weren’t being sent and we saw the Fatal Error described above in our logs.
That page loads fine in a browser, but it seems that if a page with a button is loaded/parsed in a certain way Kadence’s internal logic gets tripped up if a custom class name isn’t added (line 3:
/blocks/class-kadence-blocks-singlebtn-block.php(243): get_block_wrapper_attributes(Array) #3
).By adding a custom class to the button we were able to make this error go away (under Advanced>Advanced, Additional CSS class(es)). Hopefully this helps someone else and perhaps even gets the Kadence folks to fix this bug (??)
To whom it may concern, this is a core issue, not an issue with Kadence ??
- The topic ‘Critical error on this website’ is closed to new replies.