ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Experiencing PHP warning when using Twitter Timeline plugin

October 14, 2010 11:44am

Subscribe [7]
  • #1 / Oct 14, 2010 11:44am

    John St-Amand

    865 posts

    Just wondering if anyone knows what the implications of this error message are and how i might fix it. I’m running the EE2 version of Twitter Timeline, latest build of EE2 and it’s hosted with Engine Hosting.  Here’s the error message:

    A PHP Error was encountered
    Severity: Warning
    Message: Invalid argument supplied for foreach()
    Filename: twitter_timeline/pi.twitter_timeline.php
    Line Number: 440

    Any thoughts? It seems to come and go.  Here’s the code as I have it in my template:

    {exp:twitter_timeline screen_name="stanleyjacobsmd" limit="1" create_links="user_mentions|hashtags|urls"}
    <div class="tweet">
        <div class="status">{text}</div>
    </div>
    {/exp:twitter_timeline}

    Thanks,
    John

  • #2 / Oct 15, 2010 12:10pm

    bryantAXS

    50 posts

    I’m also seeing this error. Would love a solution, this plugin has been broken for months now.

  • #3 / Oct 15, 2010 12:17pm

    Joseph Wensley

    38 posts

    Check \system\expressionengine\cache\twitter_timeline_cache folder and open the newest file in there in a text editor.

    If it only has a couple nodes and/or says something about being rate limited then that is probably your problem, update to the newest version of the plugin because it fixed some issues with rate limiting.

  • #4 / Oct 15, 2010 12:22pm

    bryantAXS

    50 posts

    Hmm, no twitter_timeline folder in my cache directory (however i did just upgrade to EE 2.1, so maybe it just hasn’t set yet).  I’m using the most recent version of the plugin: 1.4.1

  • #5 / Oct 22, 2010 3:11am

    John St-Amand

    865 posts

    I’m using 1.4.1 of the plugin too with EE 2.1 (haven’t upgraded to 2.1.1 yet) and I do not have a twitter_timeline folder in my cache folder either. Mystery continues.

  • #6 / Oct 26, 2010 10:45pm

    Angie Herrera

    365 posts

    Hm, I’m having the exact same issue using Twitter Timeline 1.4.1 and EE 2.1 in a local environment. No cache folder for twitter timeline either. :/

  • #7 / Oct 28, 2010 4:10pm

    Clive Portman

    83 posts

    I’m getting the same error as OP, but have found the cache folder. In it:

    1288291790
    <?xml version="1.0" encoding="UTF-8"?>
    <errors>
      <error code="32">Could not authenticate you</error>
    </errors>

    Have latest version (1.4.1) and most up-to-date EE installation (2.1.1). Here’s my EE template code:

    {exp:twitter_timeline screen_name="ellislab"}
    <ul class="tweet">
    <li class="tweettext">{text}</li>
    <li class="tweetdate">{created_at format="%j %F %Y"}</li>
    </ul>
    {/exp:twitter_timeline}

    Also running on Engine Hosting…

  • #8 / Oct 28, 2010 5:35pm

    John St-Amand

    865 posts

    Still no solution on this?  It’s a first-party plugin! Help?

  • #9 / Oct 28, 2010 5:42pm

    Clive Portman

    83 posts

    It could be something with the Twitter API as my TweetDeck has been playing up recently, but I’ve had this Twitter Timeline problem for months.

    Are you using Engine Hosting?

  • #10 / Oct 29, 2010 2:23am

    Angie Herrera

    365 posts

    This probably doesn’t help the OP, but mine eventually just starting working again. Not sure what the issue was. :/

  • #11 / Oct 29, 2010 3:01am

    Edwin Flores

    13 posts

    I have the same problem. Running EE 2.1 and twitter timeline 1.4.1
    HOSTED IN ENGINE HOSTING.

  • #12 / Oct 29, 2010 4:12am

    Clive Portman

    83 posts

    Working all of a sudden. I’m convinced it’s something to do with Twitter’s end. I remember seeing a post on here about Engine Hosting being limited with the number of calls it can make to the Twitter API, or something like that. Which would explain things.

    But surely it wouldn’t be too difficult to return an error saying that, no?

    And if it keeps happening, can we have a sticky for it?

    Finally, why is this post in Codeshare Corner? Shouldn’t it be in technical support? PHP errors with a First-party plugin and all that…

  • #13 / Nov 01, 2010 5:47pm

    Twitter Timeline 1.4.1
    EE 2.1.0

    I had to ....

    Add a line in the pi.twitter_timeline.php file at line 536 like var_dump($file);
    The file that was output, the cache file, was never created by the plugin, so I made it myself.

    No more problems.

  • #14 / Nov 02, 2010 10:01am

    John St-Amand

    865 posts

    In response to your post, Pivotal, i tried that - no change.  I’m still getting:

    A PHP Error was encountered
    Severity: Warning

    Message: Invalid argument supplied for foreach()

    Filename: twitter_timeline/pi.twitter_timeline.php

    Line Number: 440

  • #15 / Nov 03, 2010 1:33pm

    I did some research into why I kept getting this error when I had my issue.  My conclusion came to be that the plugin was not caching and I was making too many requests for twitter… that reason being no cache file had been created so no matter how high I set the interval, it was still checking every time.

    The file I created looked something like a random string of 22 hex characters placed in the following directory: http://site.com/system/expressionengine/cache/twitter_timeline_cache/

    It did work for me. Perhaps, check the file you have created and see if it holds any data.  That way you can tell if it’s caching.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases