Tagged: undefined index
This is most likely not an issue on a fresh installation, but an old Enfold site that has been recently updated is now throwing the following errors when a page is updated that includes a av_fullscreen_slide element with a single image:
Notice: Undefined index: index in ../wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_fullscreen.php on line 895
Notice: Undefined index: index in ../wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_fullscreen.php on line 898
We probably could re-build the page so that the info is stored in a new updated way, but we opted to simply adjust the shortcode by first checking that the index key exists in slideshow_fullscreen.php around line 895:
if(!empty($meta['index'])){
if($meta['index'] == 0) $params['close'] = false;
if(!empty($meta['siblings']['prev']['tag']) && in_array($meta['siblings']['prev']['tag'], AviaBuilder::$full_el_no_section )) $params['close'] = false;
if($meta['index'] != 0) $params['class'] .= " slider-not-first";
}
Hey Switzer,
Thank you for sharing your solution, shall we close this then?
Best regards,
Mike