Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1004031

    HI my site was down after I did a restore to a backup this morning. It got corrupted last night after I was trying out some code in the child theme
    I was seeing this:

    `Notice: Undefined variable: post in /www/wp-content/themes/enfold-child/functions.php on line 106 Notice: Trying to get property of non-object in /www/wp-content/themes/enfold-child/functions.php on line 106 Notice: Undefined variable: post in /www/wp-content/themes/enfold-child/functions.php on line 107 Notice: Trying to get property of non-object in /www/wp-content/themes/enfold-child/functions.php on line 107 Notice: Undefined variable: display_child_pages in /www/wp-content/themes/enfold-child/functions.php on line 108 Notice: Undefined variable: sidebar_menu in /www/wp-content/themes/enfold-child/functions.php on line 108 Notice: Undefined variable: children in /www/wp-content/themes/enfold-child/functions.php on line 110 Notice: The called constructor method for WP_Widget in WPAC_Nav_Menu_Widget is deprecated since version 4.3.0! Use
    __construct()
    instead. in /www/wp-includes/functions.php on line 3916

    Fatal error: Cannot redeclare av_countdown_events_fallback() (previously declared in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/events_countdown/events_countdown.php:16) in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/events_countdown.php on line 8`

    If I read that right, the error is in the child theme functions.php, correct?
    I see the code error is here in the file:

    /*==========MAGAZINE ELEMENT add excerpt under title al l===========*/
    add_filter('avf_portfolio_cpt_args', 'avf_portfolio_add_custom_fields', 1);
    function avf_portfolio_add_custom_fields($args) {
            $args['supports'] = array('title','thumbnail','excerpt','editor','comments', 'custom-fields', 'page-attributes');
            return $args;
    }
    
    $default_sidebar = false;
    				$parent = get_the_title($post->post_parent);
    				$parentlink = get_the_permalink($post->post_parent);
                    $sidebar_menu .= "<nav class='widget widget_nav_menu $display_child_pages'><ul class='nested_nav'>";
    				$sidebar_menu .= "<h3 class='widgettitle'><a href='{$parentlink}'>$parent</a></h3>";
                    $sidebar_menu .= $children;
                    $sidebar_menu .= "</ul></nav>";
    
    add_filter('widget_text', 'do_shortcode');

    I’m not sure I need that code anymore since I think I edited the magazine.php which I have in my child theme to show the excerpts instead with this code that you gave me:

    if(empty($this->atts['thumbnails']))
    				{
    					 $image = "";
    					 $extraClass = "av-magazine-no-thumb";
    				}
    			}
    			
    		
    				$excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, '');. 

    Also I have commented out the code and the excerpt are still showing fine (see page below). Not sure what to do there, if anything

    I reinstalled the theme and that seems to have fixed the error with the events-countdown.php file that was giving me that FATAL ERROR. When the debug was still on (it’s off now) I was getting these notices:

    Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_gallery/masonry_gallery.php on line 468 Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_gallery/masonry_gallery.php on line 471 Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_gallery/masonry_gallery.php on line 472

    Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/buttons_fullwidth/buttons_fullwidth.php on line 421

    Should I do something about that those things? The site seems to be displaying OK now.
    thanks for your help

    Nancy

    • This topic was modified 6 years, 2 months ago by Munford.
    #1004138

    Hey Munford,

    Which version of php are you running?

    You might want to reupdate Enfold but via FTP this time.

    Credentials did not work for me.

    Best regards,
    Victoria

    #1004222

    HI Victoria
    I should be running phh 7.1
    I think I have worked out most of the bugs on the site now.
    These notices appeared after I updated Enfold via ftp. I’m not sure if I need to pay attention to them or not:

    Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_gallery/masonry_gallery.php on line 468 Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_gallery/masonry_gallery.php on line 471 Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/masonry_gallery/masonry_gallery.php on line 472

    Notice: Undefined index: index in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/buttons_fullwidth/buttons_fullwidth.php on line 421

    thanks
    Nancy

    #1004799

    Hi,

    Thanks for the update.

    They are not critical errors so you can just ignore them — set the WP_DEBUG to false or disable it. You can also set the builder to debug mode and then run the shortcode parser’s repair function.

    // https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#debug-mode

    Best regards,
    Ismael

    #1004838

    thanks you can close this thread

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