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.

Problem with the updated Twitter Timeline plugin...

September 01, 2010 12:31am

Subscribe [57]
  • #1 / Sep 01, 2010 12:31am

    5BYFIVE Creative

    159 posts

    I installed the new plugin and took a look and everything was working fine. I went to another site to install the updated plugin and got errors. I went back to the first site to see if I did something different and now that one is throwing errors….

    Warning: Invalid argument supplied for foreach() in /www/user/public_html/wssys/plugins/pi.twitter_timeline.php on line 394

    Warning: Invalid argument supplied for foreach() in /www/user/public_html/wssys/plugins/pi.twitter_timeline.php on line 394

    {exp:twitter_timeline screen_name="wireframeshow" limit="1" twitter_refresh="10"}
                {text}
    <span class="twitter_post_time">Posted {status_relative_date} ago.</span>
            {/exp:twitter_timeline}

    EE 1.6.9
    Build:  20100415

    Both sites are displaying the same errors, one site is 1.6.9, the other is EE2.1 Build:  20100810

    Thanks for any help!

  • #2 / Sep 01, 2010 12:42am

    5BYFIVE Creative

    159 posts

    Well for some reason the 1.6.9 site with the updated Twitter Timeline is working again…I still get the errors on the 2.1 site when I add create_links=“user_mentions|hashtags|urls” to the EE tag. When I remove it the errors are gone.

  • #3 / Sep 01, 2010 8:29am

    Nelga

    41 posts

    Same here.

    Latest Twitter Timeline throws errors on the following scenario.

    1. You use create_links=“user_mentions|hashtags|urls”

    2. But your current tweet has no hash tags, urls, or replies


    NB: If your tweet does contain links, then it works fine.


    Example Errors:

    A PHP Error was encountered

    Severity: Warning

    Message: Invalid argument supplied for foreach()

    Filename: twitter_timeline/pi.twitter_timeline.php

    Line Number: 385
    A PHP Error was encountered

    Severity: Warning

    Message: Invalid argument supplied for foreach()

    Filename: twitter_timeline/pi.twitter_timeline.php

    Line Number: 385

  • #4 / Sep 01, 2010 8:45am

    Boyink!

    5011 posts

    Just confirmed this on my own site.

  • #5 / Sep 01, 2010 10:12am

    Pascal Kriete

    2589 posts

    Hey guys,

    Sorry this is causing trouble. We’re on it, but having a hard time reproducing the error. If I could get each of you to give me the following, please:

    EE Version. PHP Version. Plugin Version (as seen at the top of the file). And if possible the full tag you’re to show the tweets (feel free to blank out the screen_name).

    Thanks,
    Pascal

  • #6 / Sep 01, 2010 10:15am

    Boyink!

    5011 posts

    EE 1.6.8 / PHP Version 5.1.6 / Twitter Timeline V 1.3

    Boyink.com:

    <div class="index" id="latest-tweet">
        <dl>
            <dt>Latest Tweet</dt>
            <dd>
                {exp:twitter_timeline screen_name="boyink" limit="1" use_stale_cache="yes"}
                    {text}
                    <a href="http://www.twitter.com/boyink/status/{id}">{created_at format="%F %j, %Y %g:%i %a"}</a>
                {/exp:twitter_timeline}
            </dd>
        </dl>
    </div>

    Boyinks4Adventure (same install, MSM):

    <div id="woo-twitter" class="block widget widget_Twidget">
        <h3 id="twitter">
        <span><a href="http://twitter.com/boyinkroadtrip/">Latest Tweets</a></span></h3>
        <ul id="twitter_update_list">
            {exp:twitter_timeline screen_name="boyinkroadtrip" limit="4"  use_stale_cache="yes" twitter_refresh="30" }
                <li>{text}
    <a href="http://www.twitter.com/boyinkroadtrip/status/{id}">{created_at format="%F %j, %Y %g:%i %a"}</a></li>
            {/exp:twitter_timeline}
        </ul>
        <div class="follow">
            <a href="http://www.twitter.com/boyinkroadtrip/" title="Follow on Twitter">Follow @BoyinkRoadTrip on Twitter</a>
        </div>
    </div>
  • #7 / Sep 01, 2010 10:31am

    Pascal Kriete

    2589 posts

    Thanks a lot Mike!

    Still no luck, they both show up error free. Could you send me a copy of your twitter_timeline cache folder? It almost looks like twitter is sending you a different response than what I’m getting. And then try deleting that folder to see if a fresh request gets it back on track.

    Thanks again for the help.

  • #8 / Sep 01, 2010 10:49am

    Boyink!

    5011 posts

    Oh - I only get the errors if I add the create_links parameter.  I didn’t have that in my sample code, so assume you added it?

    Deleted the cache, added the create_links back in and no error.  Last tweet contained a “@”.

    Tweeted with no link, user, or hashtag.

    Deleted twitter cache.

    Deleted the use_stale_cache parameter.

    Loaded the embed template with the above code:

    Warning: Invalid argument supplied for foreach() in /www/user/public_html/mbsys/plugins/pi.twitter_timeline.php on line 394
    
    Warning: Invalid argument supplied for foreach() in /www/user/public_html/mbsys/plugins/pi.twitter_timeline.php on line 394

     
    Refreshed, errors went away, but no tweet showing.

    Remove create_links and tweet appears again.

  • #9 / Sep 01, 2010 11:13am

    Pascal Kriete

    2589 posts

    Aha, finally nailed it down.

    Since we’re no longer authenticating with a username, Twitter is rate limiting the plugin based on IP. EngineHosting’s clusters share a handful of IP addresses, so we’re hitting the rate limit pretty quickly.

    I’ll yell when I get a short term fix into place.

  • #10 / Sep 01, 2010 5:20pm

    5BYFIVE Creative

    159 posts

    Aha, finally nailed it down.

    Since we’re no longer authenticating with a username, Twitter is rate limiting the plugin based on IP. EngineHosting’s clusters share a handful of IP addresses, so we’re hitting the rate limit pretty quickly.

    I’ll yell when I get a short term fix into place.

    Awesome, thanks for looking into it!

  • #11 / Sep 01, 2010 5:22pm

    bryantAXS

    50 posts

    I’m seeing this issue aswell:

    EE v2.0.2pb01 / PHP Version 5.2.6 / Twitter Timeline V 1.4

    Severity: Warning
    Message: Invalid argument supplied for foreach()
    Filename: twitter_timeline/pi.twitter_timeline.php
    Line Number: 385

  • #12 / Sep 01, 2010 9:01pm

    Sue Crocker

    26054 posts

    Hey, bryantAXS, while there isn’t a fix available yet, I want to encourage you to upgrade to EE2.1. We’re all done with the beta releases. 😊

  • #13 / Sep 03, 2010 1:24am

    Oxygen Smith

    120 posts

    +1 for this issue.

    EE v1.6.8 (changing up to latest build of 1.6.9 later on tonight) / PHP Version 5.1.6 / Twitter Timeline V 1.3 (looks like 1.4 is supposed to be here but the download link gives you 1.3.)

    Message:
    Warning: Invalid argument supplied for foreach() in (path)/ee/plugins/pi.twitter_timeline.php on line 394

  • #14 / Sep 03, 2010 3:54am

    John Henry Donovan

    12339 posts

    Sorry you too are experiencing this. Pascal will respond here when he has a fix in place.

    Just to note that the EE1.x download is version 1.3 and the EE2.x is version 1.4

  • #15 / Sep 03, 2010 9:41am

    Nevin Lyne

    370 posts

    This will not just impact our systems.  This is because of how Twitter implemented throttling when they disabled basic authentication to twitter and forced oAuth authentication.  If you don’t use oAuth authentication there is a much smaller throttle setting based on IP address rather than the higher throttling setting based on authenticated user via oAuth.  While it will happen more frequently on shared resources like our shared hosting, it will likely affect people even on private IP addresses depending on a few factors.

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

ExpressionEngine News!

#eecms, #events, #releases