-
AuthorPosts
-
April 5, 2015 at 2:46 pm #423639
Hi everyone,
I have this error:
Fatal error: Access to undeclared static property: avia_sc_section::$close_overlay in /home/www/erfolgswelt24com/wp-content/themes/enfold/template-builder.php on line 74
It only appears when the child theme is activatet. I have no idea what this means. Any ideas?
The site is: http://erfolgswelt24.com
The theme is updated to the newest version via FTP. I also deactivated all plugins but that doesn’t help.
Thanks in advance,
Sophie- This topic was modified 9 years, 8 months ago by Sophieja23.
April 6, 2015 at 5:52 am #423787Hi Sophieja23!
Did you make any changes to the child theme files?
Best regards,
RikardApril 6, 2015 at 12:16 pm #423884Hi Rikard,
yes, we did some changes, but it worked correctly until now. I have just duplicated the domain http://erfolgswelt24.com to a subdomain and tested which file causes the error. It was the functions.php which has the following content:
`<?php
#
# wrap single product image in an extra div
#
add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_image_div’, 2);
add_action( ‘woocommerce_before_single_product_summary’, ‘avia_close_image_div’, 20);
function avia_add_image_div()
{
echo “<div class=’four units single-product-main-image alpha’>”;
}function avia_close_image_div()
{
global $avia_config;
$avia_config[‘currently_viewing’] = “shop_single”;echo “</div>”;
}#
# wrap single product summary in an extra div
#
add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_summary_div’, 25);
add_action( ‘woocommerce_after_single_product_summary’, ‘avia_close_summary_div’, 3);
function avia_add_summary_div()
{
echo “<div class=’four units single-product-summary’>”;
}function avia_close_summary_div()
{
echo “</div>”; //close out the summary
echo “<div class=’four units single-product-sidebar’>”;
get_sidebar();
echo “</div>”;
}// START WAVECDN CODE
// Shortcode for generating an URL (needed for embedding videos)
// Example:
// [wavecdn_url url=’http://jahrestraining-network.wavecdn.net/JTNM-Videos/TM007-Glaubenssaetze.wmv’%5D
function wavecdn_url_func($atts)
{
if(!isset($atts[‘url’])) return;$url = $atts[‘url’];
$ip = $_SERVER[‘REMOTE_ADDR’];
$ttl = 3600;
$key = ‘9FjbwohRQ092r2hBHOiewffoja’;$expires = gmdate(‘Y-m-d H:i:s’, gmmktime() + $ttl);
$hash = md5($url.’:’.$ip.’:’.$expires.’:’.$key);
$token = $hash.’:’.str_replace(‘=’, ”, base64_encode($expires));if(strpos($url, ‘?’)) $url .= ‘&token=’.$token;
else $url .= ‘?token=’.$token;return $url;
}
add_shortcode(‘wavecdn_url’, ‘wavecdn_url_func’);// Shortcode for generating a clickable link
// Examples:
// [wavecdn_link url=’http://jahrestraining-network.wavecdn.net/JTNM-Videos/TM007-Glaubenssaetze.wmv’%5D
// [wavecdn_link url=’http://jahrestraining-network.wavecdn.net/JTNM-Videos/TM007-Glaubenssaetze.wmv’ label=’Hier klicken’]
function wavecdn_link_func($atts)
{
if(!isset($atts[‘url’])) return;
$url = wavecdn_url_func(array(‘url’ => $atts[‘url’]));
$label = isset($atts[‘label’]) ? $atts[‘label’] : ‘Download’;$html = ‘‘.htmlentities(utf8_decode($label)).’‘;
return $html;
}
add_shortcode(‘wavecdn_link’, ‘wavecdn_link_func’);// Shortcode for embedding a video
function wavecdn_video_func($atts)
{
$r = ‘<script src=”http://jwpsrv.com/library/v686EBPyEeSyNCIAC0MJiQ.js”></script>’.”\n”;
$r .= ‘<div id=”myElement”>Lade…</div>’.”\n”;
$r .= ‘<script>// <![CDATA[‘.”\n”;
$r .= ‘jwplayer(“myElement”).setup({‘.”\n”;
$r .= ‘file: “‘.wavecdn_url_func($atts).'”,’.”\n”;
$r .= ‘width: 640,’.”\n”;
$r .= ‘height: 360’.”\n”;
$r .= ‘})’.”\n”;
$r .= ‘// ]]></script>’.”\n”;return $r;
}
add_shortcode(‘wavecdn_video’, ‘wavecdn_video_func’);// END WAVECDN CODE
add_filter(‘avia_load_shortcodes’, ‘avia_include_shortcode_template’, 15, 1);
function avia_include_shortcode_template($paths)
{
$template_url = get_stylesheet_directory();
array_unshift($paths, $template_url.’/shortcodes/’);return $paths;
}/**
* Auto Complete all WooCommerce orders.
* Add to theme functions.php file
*/add_action( ‘woocommerce_thankyou’, ‘custom_woocommerce_auto_complete_order’ );
function custom_woocommerce_auto_complete_order( $order_id ) {
global $woocommerce;if ( !$order_id )
return;
$order = new WC_Order( $order_id );
$order->update_status( ‘completed’ );As mentioned it works fine in the past and I cannot see a connection to the template-builder.php.
Thanks for your help, Sophie
- This reply was modified 9 years, 8 months ago by Sophieja23.
April 7, 2015 at 4:52 am #424415Hi!
Thank you for the info. Please post the login details here so that we can check the site. If possible, please include the ftp login details. We would like to check the child theme directory.
Cheers!
IsmaelApril 7, 2015 at 11:02 am #424566This reply has been marked as private.April 8, 2015 at 3:25 am #425044Hey!
You also have the section.php file in the child theme folder. What is it doing in there? If you want to modify the shortcode templates inside the child theme folder, you need to create a “shortcodes” folder then place all shortcode templates inside. Add this to the functions.php file:
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1); function avia_include_shortcode_template($paths) { $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; }
EDIT: You already have that code on functions.php so just create a “shortcodes” folder. Place the section.php file inside.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.