After update, widgets broken

Home Forums Calendar Products Events Calendar PRO After update, widgets broken

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1115659
    nysci
    Participant

    After updating to the latest version, the widgets don’t show and in fact are breaking the site (nothing after the widget is loaded into the page).

    In my WordPress debug.log, I have this string of notices:

    [18-Mar-2016 14:41:31 UTC] PHP Notice: get_theme_data is <strong>deprecated</strong> since version 3.4! Use wp_get_theme() instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3573
    [18-Mar-2016 14:41:31 UTC] PHP Strict Standards: Redefining already defined constructor for class myCustomFields in /Users/aaron/Sites/www-nysci-org/wp-content/themes/bigbangwp/includes/bra_custom_fields.php on line 173
    [18-Mar-2016 14:41:31 UTC] PHP Notice: The called constructor method for WP_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3624
    [18-Mar-2016 14:41:31 UTC] PHP Notice: /Users/aaron/Sites/www-nysci-org/wp-content/plugins/events-calendar-pro/src/deprecated/TribeEventsPro.php is <strong>deprecated</strong> since version 3.10! Use Tribe__Events__Pro__Main instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3677
    [18-Mar-2016 14:41:31 UTC] PHP Notice: /Users/aaron/Sites/www-nysci-org/wp-content/plugins/events-calendar-pro/src/deprecated/TribeEventsPro_RecurrenceInstance.php is <strong>deprecated</strong> since version 3.10! Use Tribe__Events__Pro__Recurrence__Instance instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3677
    [18-Mar-2016 14:41:35 UTC] PHP Notice: Undefined index: obsres_debug in /Users/aaron/Sites/www-nysci-org/wp-content/plugins/wcg-ob-res-api/wcg-ob-res-api.php on line 38
    [18-Mar-2016 14:41:36 UTC] PHP Notice: get_theme_data is <strong>deprecated</strong> since version 3.4! Use wp_get_theme() instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3573
    [18-Mar-2016 14:41:36 UTC] PHP Strict Standards: Redefining already defined constructor for class myCustomFields in /Users/aaron/Sites/www-nysci-org/wp-content/themes/bigbangwp/includes/bra_custom_fields.php on line 173
    [18-Mar-2016 14:41:36 UTC] PHP Notice: The called constructor method for WP_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3624
    [18-Mar-2016 14:41:36 UTC] PHP Notice: /Users/aaron/Sites/www-nysci-org/wp-content/plugins/events-calendar-pro/src/deprecated/TribeEventsPro.php is <strong>deprecated</strong> since version 3.10! Use Tribe__Events__Pro__Main instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3677
    [18-Mar-2016 14:41:36 UTC] PHP Notice: /Users/aaron/Sites/www-nysci-org/wp-content/plugins/events-calendar-pro/src/deprecated/TribeEventsPro_RecurrenceInstance.php is <strong>deprecated</strong> since version 3.10! Use Tribe__Events__Pro__Recurrence__Instance instead. in /Users/aaron/Sites/www-nysci-org/wp-includes/functions.php on line 3677

    It’s weird that the latest version of the plugin is complaining about itself that its deprecated … there must be a quick fix to this. Help?

    I did, by the way, switch to TwentySixteen and the widgets work. But since the only errors I have to work from are those above, which are confusing (and since the plugin worked with the theme before the plugin upgrade) I’m hoping you can give me some ideas of where to start solving.

    New Note: I did post this same topic a couple of months ago, but missed the email of the reply. In that reply, Geoff B wrote “What might be going on though is that, if you have template customizations in place (found in the /tribe-events/ folder of your WordPress theme), you might need to update the call to these deprecated functions by calls to newer ones.”

    I grepped for a couple of the functions mentioned in the error notices, and they didn’t turn up in my theme folder. Another clue may be that it’s the widget causing the problem. And I haven’t customized the widgets.

    p.s. I say that this is for nysciwww, which I’m running locally, but the problem also occurs on the live site, nysci.org, which is identical in that they are both connected via git.

    Help! Thanks!

    #1115722
    Brook
    Participant

    Howdy Nysci,

    I am sorry the update is giving you trouble. I would love to help you figure out the errors.

    First thing I would recommend is to update one more time. Totally optionally, but since your original post a couple of months ago we have released a few new version and bugfixes. In my experience its usually nice to be on the latest before working to make your theme compatible.

     

    Do you remember what you grepped for? The deprecated notice is indeed a bit cryptic, basically because WordPress deprecation only supports functions and does not do well with deprecated class names. The Tribe classes referenced in your error message that have been deprecated are:

    • TribeEventsPro_RecurrenceInstance
    • TribeEventsPro

    Could you try do a search for both of those anywhere inside the /wp-content/ folder? You should see one instance of each inside the Events Calendar Pro folder. Any result outside the Events Calendar Pro is what is causing the error. If I can help you with those errors once you find them let me know where they are and perhaps if you can upload the problem files here.

    The other deprecation notices are from WordPress and do not have to do with our plugin, but you might be interested in investigating them further as they are a sign that your theme is not designed for any recent version of WordPress.

    I am not totally sure those notices are related to your issue though. Typically notices do not stop a page from loading, their entire purpose is to give useful tips not to indicate that something is already broken. But sometimes the useful tip itself breaks the page… so it’s worth looking into for now.

    Cheers!

    – Brook

    #1116595
    nysci
    Participant

    Thanks, Brook.

    I did a bunch of grepping and couldn’t find any instances of those out-of-date classes. However, I did find the source of the problem! There is a file in the site’s theme folder: tribe-events/list-widget.php. It had the code below. It was probably copied out of the plugin folder itself years ago and just had slight html modifications made. Over time, they became out-dated to the point where they didn’t work at all. Anyway, I’ve removed that file and now the page is no longer broken!

    <?php
    /**
     * Events Pro List Widget Template
     * This is the template for the output of the events list widget. 
     * All the items are turned on and off through the widget admin.
     * There is currently no default styling, which is highly needed.
     *
     * Override this template in your own theme by creating a file at [your-theme]/tribe-events/widgets/list-widget.php
     *
     * When the template is loaded, the following vars are set: $start, $end, $venue, 
     * $address, $city, $state, $province'], $zip, $country, $phone, $cost
     *
     * @package TribeEventsCalendarPro
     * @since  1.0
     * @author Modern Tribe Inc.
     *
     */
    
    if ( !defined('ABSPATH') ) { die('-1'); } ?>
    
    <?php 
    $widget_args = tribe_events_get_adv_list_widget_args(); 
    extract($widget_args);
    ?>
    
    <li>
    	<div class="duration">
    			<?php echo tribe_events_event_schedule_details(); ?>	
    	</div>
    	<div class="thumbList1">
    		<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('upcoming-event'); ?></a>
    	</div>
    	<div class="item-info1">
    	<h3 class="entry-title">
    		<a  class="aa" href="<?php echo tribe_get_event_link(); ?>" rel="bookmark"><?php the_title(); ?></a>
    	</h3>
    	</div>
    </li>
    </br>
    #1116797
    Brook
    Participant

    Interesting. Thank you for getting back. That is quite a puzzler. I’m sorry I wasn’t of more help me.

    Let us know if you ever need anything else. Cheers!

    – Brook

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘After update, widgets broken’ is closed to new replies.