Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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->app

    I still have admin access. Any idea on the error?

    Keith

    #1189205

    Hey 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,
    Rikard

    #1189527

    I 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->app

    I have attached the log in details.

    #1189664

    Hi,

    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,
    Rikard

    #1189806

    It happens when you edit any page. I have included a link in Private.
    K

    #1189929

    Hi,

    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,
    Rikard

    #1190503

    I 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
    }
    #1191911

    Hi roamingk,

    The code looks fine, if the bracket was missing it would break the website. Are you still getting the error?

    Best regards,
    Victoria

    #1192006

    when I put this code in, yes I get the error, when I take it out it works.

    #1192223

    Hi roamingk,

    Please try commenting out this code:
    Image 2020-03-11 at 12.25.20.png

    Do you intend to use block editor all the time?

    Best regards,
    Victoria

    #1193252

    I tried removing that code, still get the error.. its frustrating.

    #1194660

    Hi,

    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,
    Ismael

    #1198166

    Great thank you that worked perfect.

    #1198258

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.