• Resolved StevenP94

    (@stevenp94)


    Hello, I’m trying to update my site, actually using 4.9.0, but every time I try I get this errors:

    
    PHP Fatal error:  Uncaught Error: Call to undefined function tribe_get_events() in /var/www/..../wp-content/themes/DeepFocus-child/home.php:35
    Stack trace:
    #0 /var/www/..../wp-includes/template-loader.php(77): include()
    #1 /var/www/..../wp-blog-header.php(19): require_once('/var/www/...')
    #2 /var/www/salotto/index.php(17): require('/var/www/...')
    #3 {main}
      thrown in /var/www/..../wp-content/themes/DeepFocus-child/home.php on line 35
      
      
    PHP Fatal error:  Uncaught Error: Call to undefined function tribe_is_event_query() in /var/www/salotto/wp-content/themes/DeepFocus-child/includes/breadcrumbs.php:20
    Stack trace:
    #0 /var/www/..../wp-includes/template.php(706): require()
    #1 /var/www/..../wp-includes/template.php(653): load_template('/var/www/...', false)
    #2 /var/www/..../wp-includes/general-template.php(157): locate_template(Array, true, false)
    #3 /var/www/..../wp-content/themes/DeepFocus-child/post-full-nometa.php(17): get_template_part('includes/breadc...')
    #4 /var/www/..../wp-includes/template-loader.php(77): include('/var/www/...')
    #5 /var/www/..../wp-blog-header.php(19): require_once('/var/www/...')
    #6 /var/www/..../index.php(17): require('/var/www/...')
    #7 {main}
      thrown in /var/www/..../wp-content/themes/DeepFocus-child/includes/breadcrumbs.php on line 20
    
    

    this happens opening the home page that has a ‘next events’ section.

    this is the home.php up to the error line

    
    
    <?php get_header();
     ?>
    
            <div id="content-full">
                    <div id="home-top"></div>
                    <div id="hr">
                            <div id="hr-center">
                                    <div id="intro">
                                            <div class="center-highlight">
    
                                                    <div class="container">
    
                                                            <?php if (get_option('deepfocus_featured') == 'on') get_template_part('includes/featured'); ?>
    
                                                            <?php if (get_option('deepfocus_quote') == 'on') { ?>
                                                                    <div id="tagline">
                                                                            <p><?php echo wp_kses_post(get_option('deepfocus_quote_one')); ?><span class="quote2" style="padding-left:0px;"></span></p>
                                                                            <!-- <span class="quote2"><?php echo wp_kses_post(get_option('deepfocus_quote_two')); ?></span> -->
                                                                    </div>  <!-- end #tagline-->
                                                            <?php } ?>
    
                                                    </div> <!-- end .container -->
                                            </div> <!-- end .center-highlight -->
                                    </div>  <!-- end #intro -->
                            </div> <!-- end #hr-center -->
                    </div> <!-- end #hr -->
    
                    <div class="center-highlight">
                            <div class="container">
    
                                    <?php
                                            $featured_events = tribe_get_events( array(
                                                'tribe_events_cat'  => '',
                                                'start_date'        => current_time( 'd-m-Y' ),
                                                'showposts'         => 3
                                            ));
    
    

    and this is the breadcrumb.php

    
    
    <div id="breadcrumbs">
    
            <?php
                      if(function_exists('bcn_display')) { bcn_display(); }
                      else { ?>
                                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e('Home','DeepFocus') ?></a> <span class="raquo">&raquo;</span>
    
                                    <?php if( is_tag() ) { ?>
                                            <?php esc_html_e('Posts Tagged ','DeepFocus') ?><span class="raquo">&quot;</span><?php single_tag_title(); echo('&quot;'); ?>
                                    <?php } elseif (is_day()) { ?>
                                            <?php esc_html_e('Posts made in','DeepFocus') ?> <?php the_time('F jS, Y'); ?>
                                    <?php } elseif (is_month()) { ?>
                                            <?php esc_html_e('Posts made in','DeepFocus') ?> <?php the_time('F, Y'); ?>
                                    <?php } elseif (is_year()) { ?>
                                            <?php esc_html_e('Posts made in','DeepFocus') ?> <?php the_time('Y'); ?>
                                    <?php } elseif (is_search()) { ?>
                                            <?php esc_html_e('Search results for','DeepFocus') ?> <?php the_search_query() ?>
                                    <?php } elseif (tribe_is_event_query() && is_single()) { ?> <?php echo '<a href="'.tribe_get_events_link().'">Eventi</a>'; ?>
                                    <?php } elseif (is_single()) { ?>
                                            <?php $category = get_the_category();
                                                      $catlink = get_category_link( $category[0]->cat_ID );
                                                      echo ('<a href="'.esc_url($catlink).'">'.esc_html($category[0]->cat_name).'</a> '.'<span class="raquo">&raquo;</span> '.get_the_title()); ?>
                                    <?php } elseif (is_category()) { ?>
                                            <?php single_cat_title(); ?>
                                    <?php } elseif (is_author()) { ?>
                                            <?php $curauth = get_userdata($post->post_author); ?>
                                            <?php esc_html_e('Posts by ','DeepFocus'); echo ' ',$curauth->nickname; ?>
                                    <?php } elseif (is_page()) { ?>
                                            <?php single_post_title(); ?>
                                    <?php }; ?>
            <?php }; ?>
    </div> <!-- end #breadcrumbs -->
    

    The two functions used

    $featured_events = tribe_get_events( array(
                                                'tribe_events_cat'  => '',
                                                'start_date'        => current_time( 'd-m-Y' ),
                                                'showposts'         => 3
                                            ));

    <?php } elseif (tribe_is_event_query() && is_single()) { ?> <?php echo '<a href="'.tribe_get_events_link().'">Eventi</a>'; ?>

    are not found anymore.
    Any ideas ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Zach Tirrell

    (@zbtirrell)

    Those functions definitely should still exist ??

    Are you sure that The Events Calendar is activated? Do you recall what version you were running previously when this was functional?

    As a fast-fix, I’d try to get back on a known good version and then we can help you figure out where this is getting broken.

    -Zach

    Thread Starter StevenP94

    (@stevenp94)

    Thanks for your reply. Yes the calendar is activated. I’m currently using 4.9.0, this is the last version working. I’m on a linux ubuntu 18.04.2 box with PHP 7.2.
    Any update of my current version break the site with the errors that I posted on my first message.
    Of course I was lucky and had a backup to recover working version.
    I have event ticket version 4.10.3 and event ticket plus version 4.10.2 on that site. I’m waiting for the events calendar working before try to update them.

    Thanks again for your support and excuse me for my english.

    Thread Starter StevenP94

    (@stevenp94)

    The same with 4.9.1.1 – Any news on a workaround / solution ?
    Do yuo need a sample site ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The events calendar 4.9.0.2 and 4.9.0.3 update PHP Errors’ is closed to new replies.