Avada › Forums › Community Forum › Update V7.9.2 -> Fatal error
-
AuthorPosts
-
Hello
After updating and applying all patches (
Fatal error: Uncaught Error: Call to undefined method Avada_Layout::add_style() in /home/pashamai/pasha4ur.org.ua/www/wp-content/themes/Avada-Child-Theme/single.php:17 Stack trace: #0 /home/pashamai/pasha4ur.org.ua/www/wp-includes/template-loader.php(106): include() #1 /home/pashamai/pasha4ur.org.ua/www/wp-blog-header.php(19): require_once(‘/home/pashamai/…’) #2 /home/pashamai/pasha4ur.org.ua/www/index.php(17): require(‘/home/pashamai/…’) #3 {main} thrown in /home/pashamai/pasha4ur.org.ua/www/wp-content/themes/Avada-Child-Theme/single.php on line 17
There has been a critical error on this website.Learn more about troubleshooting WordPress.
V7.9.2
#421055
Jan. 18, 2023
Fixes double sidebar position issue.#421079
Jan. 20, 2023
Fixes missing continue button on WooCommerce legacy checkout page.#421083
Jan. 23, 2023
Fixes post lock popup not showing up in the Live Editor.NICE QA!!!
I reverted site from backup.
-
This topic was modified 1 month, 2 weeks ago by
pasha4ur.
Hello There
It appears that the issue is coming from your child theme, specifically the customised single.php file so you may need to check with your developer or whoever worked on the site in this case, if you simply switch to your parent (main Avada) the issue should be resolved.
Thanks
-Ammar
It worked few years before and it works now on 7.8 https://pasha4ur.org.ua/
So, problems is in Avada developers’ hands, imho.
17th line in single.php:
<section id=”content” <?php Avada()->layout->add_style( ‘content_style’ ); ?>>if you simply switch to your parent (main Avada) the issue should be resolved.
Maybe I don’t need parent theme if I created child theme?
We continue to have problems and did have a critical error. Now we have html showing up on page load. please help as these are issues with live sites
https://www.dropbox.com/s/z7axcm2wq62cksi/image.png?dl=0Hello @drpat
You already have a GrandFathered Support, please open a ticket further and our team will get back to you as soon as possible.
Click Here to Get Avada Support
Thanks
-Ammar
Is there any adequate solution to the problem?
Your update brakes site which works many years.
Hello
I didn’t change anything in child theme in last 3 years
Fatal error: Uncaught Error: Call to undefined method Avada_Layout::add_style() in /home/pashamai/pasha4ur.org.ua/www/wp-content/themes/Avada-Child-Theme/single.php:17
single.php
<?php /** * Template used for single posts and other post-types * that don't have a specific template. * * @package Avada * @subpackage Templates */ // Do not allow directly accessing this file. if ( ! defined( 'ABSPATH' ) ) { exit( 'Direct script access denied.' ); } ?> <?php get_header(); ?> <section id="content" <?php Avada()->layout->add_style( 'content_style' ); ?>> <?php while ( have_posts() ) : ?> <?php the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'post' ); ?>> <?php $full_image = ''; ?> <?php if ( 'above' === Avada()->settings->get( 'blog_post_title' ) ) : ?> <?php if ( 'below_title' === Avada()->settings->get( 'blog_post_meta_position' ) ) : ?> <div class="fusion-post-title-meta-wrap"> <?php endif; ?> <?php $title_size = ( false === avada_is_page_title_bar_enabled( $post->ID ) ? '1' : '2' ); ?> <?php echo avada_render_post_title( $post->ID, false, '', $title_size ); // phpcs:ignore WordPress.Security.EscapeOutput ?> <?php if ( 'below_title' === Avada()->settings->get( 'blog_post_meta_position' ) ) : ?> <?php echo avada_render_post_metadata( 'single' ); // phpcs:ignore WordPress.Security.EscapeOutput ?> </div> <?php endif; ?> <?php elseif ( 'disabled' === Avada()->settings->get( 'blog_post_title' ) && Avada()->settings->get( 'disable_date_rich_snippet_pages' ) && Avada()->settings->get( 'disable_rich_snippet_title' ) ) : ?> <span class="entry-title" style="display: none;"><?php the_title(); ?></span> <?php endif; ?> <?php avada_singular_featured_image(); ?> <?php if ( 'below' === Avada()->settings->get( 'blog_post_title' ) ) : ?> <?php if ( 'below_title' === Avada()->settings->get( 'blog_post_meta_position' ) ) : ?> <div class="fusion-post-title-meta-wrap"> <?php endif; ?> <?php $title_size = ( false === avada_is_page_title_bar_enabled( $post->ID ) ? '1' : '2' ); ?> <?php echo avada_render_post_title( $post->ID, false, '', $title_size ); // phpcs:ignore WordPress.Security.EscapeOutput ?> <?php if ( 'below_title' === Avada()->settings->get( 'blog_post_meta_position' ) ) : ?> <?php echo avada_render_post_metadata( 'single' ); // phpcs:ignore WordPress.Security.EscapeOutput ?> </div> <?php endif; ?> <?php endif; ?> <div class="post-content"> <?php the_content(); ?> <?php fusion_link_pages(); ?> </div> <?php if ( ! post_password_required( $post->ID ) ) : ?> <?php if ( '' === Avada()->settings->get( 'blog_post_meta_position' ) || 'below_article' === Avada()->settings->get( 'blog_post_meta_position' ) || 'disabled' === Avada()->settings->get( 'blog_post_title' ) ) : ?> <?php echo avada_render_post_metadata( 'single' ); // phpcs:ignore WordPress.Security.EscapeOutput ?> <?php endif; ?> <?php do_action( 'avada_before_additional_post_content' ); ?> <?php avada_render_social_sharing(); ?> <?php $author_info = get_post_meta( $post->ID, 'pyre_author_info', true ); ?> <?php if ( ( Avada()->settings->get( 'author_info' ) && 'no' !== $author_info ) || ( ! Avada()->settings->get( 'author_info' ) && 'yes' === $author_info ) ) : ?> <section class="about-author"> <?php ob_start(); ?> <?php the_author_posts_link(); ?> <?php /* translators: The link. */ ?> <?php $title = sprintf( __( 'About the Author: %s', 'Avada' ), ob_get_clean() ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride ?> <?php $title_size = ( false === avada_is_page_title_bar_enabled( $post->ID ) ? '2' : '3' ); ?> <?php Avada()->template->title_template( $title, $title_size ); ?> <div class="about-author-container"> <div class="avatar"> <?php echo get_avatar( get_the_author_meta( 'email' ), '72' ); ?> </div> <div class="description"> <?php the_author_meta( 'description' ); ?> </div> </div> </section> <?php endif; ?> <?php if ( fusion_get_option( 'blog_pn_nav' ) ) : // blog navigation ?> <?php pasha4ur_post_nav(); ?> <?php endif; ?> <?php avada_render_related_posts( get_post_type() ); // Render Related Posts. ?> <?php $post_comments = get_post_meta( $post->ID, 'pyre_post_comments', true ); ?> <?php if ( ( Avada()->settings->get( 'blog_comments' ) && 'no' !== $post_comments ) || ( ! Avada()->settings->get( 'blog_comments' ) && 'yes' === $post_comments ) ) : ?> <?php comments_template(); ?> <?php endif; ?> <?php do_action( 'avada_after_additional_post_content' ); ?> <?php endif; ?> </article> <?php endwhile; ?> </section> <?php do_action( 'avada_after_content' ); ?> <?php get_footer(); ?>
-
This topic was modified 1 month, 2 weeks ago by
-
AuthorPosts
- You must be logged in to reply to this topic.