Support » Plugin: Twitter Tracker » Page generation stops on Twitter Tracker error

  • Resolved kwdavids


    I just installed Twitter Tracker, authorized with Twitter, and added Twitter Search Tracker to the sidebar. After that the HTML page generation stops immediately after the title for the Widget with a PHP error in the error_log.

    Here are the settings (if not listed, blank):

    Title: Twitter feed
    Twitter search: #this_that
    Max tweets to show: 6
    Hide @ replies: checked
    Include retweets: checked
    Hide all Emoji: selected

    I have the WP Widget Cache plug-in installed. I found this in my error_log:

    07-Aug-2013 13:33:10 UTC] PHP Fatal error: Call to a member function remove_replies() on a non-object in …/wp-content/plugins/twitter-tracker/twitter-tracker.php on line 251

Viewing 3 replies - 1 through 3 (of 3 total)
  • I came to look here since I have the exact same error. Strange thing is Twitter Tracker has been running here already for nearly a year without much problems. So something has changed somewhere since it gives fatal errors at the moment.

    I think it’s connected to the new version. I tested an older version of Twitter Tracker- which doesn’t work anymore because of the need for authorization from Twitter -and it doesn’t give the error.

    Problem arises when a twitter search is done and no results are found. The $response object then is empty (and not an object).

    I have made a quick fix which seems to work ( didn’t do an awful lot of testing so beware ) :

    if ( is_wp_error( $response ) ) {
    			error_log( "Twitter Tracker response error: " . print_r( $response, true ) );
    // begin fix
    	if (! is_object($response))
    			$vars = array(
    				'msg' => __( 'No tweets!', 'twitter-tracker' ),
    			$this->render( 'widget-error', $vars );
    // end fix
    if ( $hide_replies )

    Insert the code between start and end fix between the two statements that are around line 250 and it will give an nice error that no tweets are found instead of a fatal error.

    Plugin author probably should implement a better fix or return an emtpy object that still works if things are not found. 🙂



    Super. That worked. I wasn’t aware that the query was empty, but apparently it was.

    Thanks so much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page generation stops on Twitter Tracker error’ is closed to new replies.