WordPress.org

Support

Support » Plugins and Hacks » Simple Twitter Tweets » [Resolved] Error: Cannot redeclare class TwitterOAuth

[Resolved] Error: Cannot redeclare class TwitterOAuth

  • I have two instances of the Simple Twitter Tweets widget displaying from two different users on my homepage. Most of the time, both load fine. But about 10% of the time I get this error message for the second widget:

    Fatal error: Cannot redeclare class TwitterOAuth in /home2/volufire/public_html/wp-content/plugins/simple-twitter-tweets/twitteroauth/twitteroauth.php on line 15

    I’ve looked at all my other plugins loaded and don’t think any others are loading the OAuth — is it possible that I can’t use two instances of this widget on one page? here is the site:
    http://www.volunteerfirefighter-or.org/

    Thank you for your help!

    http://wordpress.org/extend/plugins/simple-twitter-tweets/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Michel Vertige

    @michel-vertige

    I had the same problem. Its because some other plugin also uses the Twitter OAuth API, and uses the same class to deal with it.
    I could fix it by editing the simple-twitter-tweets.php file, on line 408, replace this :

    include 'twitteroauth/twitteroauth.php';

    with

    if ( ! class_exists('TwitterOAuth'))
        include 'twitteroauth/twitteroauth.php';

    This should be included in a future update of the plugin…
    Dear plugin developer, could you merge this fix into the main branch ?

    notjoeflynn

    @notjoeflynn

    I’m also having this issue, though I’m disinclined to hack on a plugin for fear of it breaking on update. Are there any plans to resolve this soon?

    Plugin Author Planet Interactive

    @planet-interactive

    Michel, Good catch – minor oversight on our part, thanks for this it’s now on the list and will be in next update.

    notjoeflynn go for it – it will be in the next update as documented above.

    Thanks again

    Michel Vertige

    @michel-vertige

    Great !

    Thanks for your reactivity.

    notjoeflynn

    @notjoeflynn

    Thanks for the quick response. Y’all rule!

    Plugin Author Planet Interactive

    @planet-interactive

    Now in 3.0

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Error: Cannot redeclare class TwitterOAuth’ is closed to new replies.
Skip to toolbar