Tagged: fatal error
-
AuthorPosts
-
February 29, 2020 at 6:07 pm #1189036
I have the latest version of Enfold and WordPress. When I go to edit a page, I get the following error:
Error Details
=============
An error of type E_ERROR was caused in line 1146 of the file /home/gaysitge/public_html/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php. Error message: Uncaught TypeError: Argument 1 passed to Avia_Gutenberg::handler_avf_builder_boxes() must be of the type array, null given, called in /home/gaysitge/public_html/wp-includes/class-wp-hook.php on line 288 and defined in /home/gaysitge/public_html/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php:1146
Stack trace:
#0 /home/gaysitge/public_html/wp-includes/class-wp-hook.php(288): Avia_Gutenberg->handler_avf_builder_boxes(NULL)
#1 /home/gaysitge/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array)
#2 /home/gaysitge/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/config/meta.php(31): apply_filters(‘avf_builder_box…’, Array)
#3 /home/gaysitge/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/template-builder.class.php(1945): include(‘/home/gaysitge/…’)
#4 /home/gaysitge/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/template-builder.class.php(490): AviaBuilder->appI still have admin access. Any idea on the error?
Keith
March 1, 2020 at 2:32 pm #1189205Hey Keith,
Are you using the Block Editor or the Classic Editor in the main page of the theme options? If you are using the Block Editor then please try to switch to the Classic Editor to see if that makes any difference. If not then please post admin login details in private so that we can have a closer look.
Best regards,
RikardMarch 2, 2020 at 9:45 pm #1189527I switched from “Classic” to “Block”, got an error with both .. this is the error with the block:
Error Details
=============
An error of type E_ERROR was caused in line 1146 of the file /home/gaysitge/public_html/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php. Error message: Uncaught TypeError: Argument 1 passed to Avia_Gutenberg::handler_avf_builder_boxes() must be of the type array, null given, called in /home/gaysitge/public_html/wp-includes/class-wp-hook.php on line 288 and defined in /home/gaysitge/public_html/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php:1146
Stack trace:
#0 /home/gaysitge/public_html/wp-includes/class-wp-hook.php(288): Avia_Gutenberg->handler_avf_builder_boxes(NULL)
#1 /home/gaysitge/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array)
#2 /home/gaysitge/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/config/meta.php(31): apply_filters(‘avf_builder_box…’, Array)
#3 /home/gaysitge/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/template-builder.class.php(1945): include(‘/home/gaysitge/…’)
#4 /home/gaysitge/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/template-builder.class.php(490): AviaBuilder->appI have attached the log in details.
March 3, 2020 at 10:31 am #1189664Hi,
Thanks for the update and login details. I can’t see URL to your site though, could you include that as well please?
Best regards,
RikardMarch 3, 2020 at 6:30 pm #1189806It happens when you edit any page. I have included a link in Private.
KMarch 4, 2020 at 8:20 am #1189929Hi,
Thanks for that, I see the same problem on my end. I can’t reproduce it on my local installation though, so it’s likely something local to your site. What happens if you disable all plugins to see if there is a conflict coming from any of them, or if you activate the parent theme instead of the child?
Best regards,
RikardMarch 5, 2020 at 5:15 pm #1190503I removed the custom code that is in the functions file and it worked, however I don’t know what is causing the error in the code, I think it might be a missing bracket. Is there any way to check?
<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ //set builder mode to debug add_action('avia_builder_mode', "builder_set_debug"); function builder_set_debug() { return "debug"; } /* Change Blog Archive Style */ function change_blog_archive_style() { global $avia_config; if(!is_single()){ $avia_config['blog_content'] = "excerpt_read_more"; } } add_action('get_header', 'change_blog_archive_style'); add_filter('avf_builder_boxes', 'add_builder_to_posttype'); function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'bar'; $supported_post_types[] = 'event'; $supported_post_types[] = 'restaurant'; $supported_post_types[] = 'saunas'; $supported_post_types[] = 'clubs'; $supported_post_types[] = 'shopping'; $supported_post_types[] = 'galleries'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1); add_action('wp_footer', 'add_custom_css'); function add_custom_css() { ?> <script> jQuery(document).ready(function($) { }); </script> <style> @media only screen and (max-width: 767px) { .single-post #footer div .av_one_third { margin: 0; margin-bottom: 20px; width: 100%; } } </style> <?php }
March 10, 2020 at 4:49 pm #1191911Hi roamingk,
The code looks fine, if the bracket was missing it would break the website. Are you still getting the error?
Best regards,
VictoriaMarch 10, 2020 at 9:05 pm #1192006when I put this code in, yes I get the error, when I take it out it works.
March 11, 2020 at 12:26 pm #1192223March 15, 2020 at 6:42 pm #1193252I tried removing that code, still get the error.. its frustrating.
March 20, 2020 at 3:31 am #1194660Hi,
Sorry for the delay. You have to remove this line from the functions.php file.
add_filter('avf_builder_boxes', 'add_builder_to_posttype');
The add_builder_to_posttype callback doesn’t exists.
Best regards,
IsmaelMarch 26, 2020 at 9:27 pm #1198166Great thank you that worked perfect.
March 27, 2020 at 8:01 am #1198258 -
AuthorPosts
- You must be logged in to reply to this topic.