WordPress.org

Ready to get started?Download WordPress

Forums

Simple Twitter Tweets
[resolved] Error: Cannot redeclare class TwitterOAuth (7 posts)

  1. Kelli Sussman
    Member
    Posted 1 year ago #

    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/

  2. Michel Vertige
    Member
    Posted 8 months ago #

    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 ?

  3. notjoeflynn
    Member
    Posted 8 months ago #

    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?

  4. Planet Interactive
    Member
    Plugin Author

    Posted 8 months ago #

    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

  5. Michel Vertige
    Member
    Posted 8 months ago #

    Great !

    Thanks for your reactivity.

  6. notjoeflynn
    Member
    Posted 8 months ago #

    Thanks for the quick response. Y'all rule!

  7. Planet Interactive
    Member
    Plugin Author

    Posted 3 months ago #

    Now in 3.0

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.