WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
4.2 gives fatal error while activating (18 posts)

  1. chonazz
    Member
    Posted 2 years ago #

    Hi there,

    I've just updates my Google Analytics plugin By Yoast to the latest version. I get a fatal php error when I try to activated it again:
    Fatal error: Cannot redeclare class OAuthException in /home/jonassmets/domains/dewereldverzamelaar.net/public_html/wp-content/plugins/google-analytics-for-wordpress/wp-gdata/OAuth.php on line 8

    I've go no knowledge about php so i've no idea to solve this.
    Before this I was running the previous latest version... I haven't changed a thing to my wordpress setup so I don't think it has anything to do with this.

    Hope someone could help?
    Jonas

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

  2. nicolas.nicolas
    Member
    Posted 2 years ago #

    Hi,

    I have the same Probleme.

    Waht's the solution ? We need to modify anything in the file OAuthException

    Thanks for your help

    Nico

  3. pcsservices
    Member
    Posted 2 years ago #

    Same issue with me.

    Blog still runs but I cannot access the admin area.

    Fatal error: Cannot redeclare class OAuthException in . . . . ./blog/wp-content/plugins/google-analytics-for-wordpress/wp-gdata/OAuth.php on line 8

  4. janilxx
    Member
    Posted 2 years ago #

    Same here because Simple Twitter Connect uses also OAuth.

    Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1 in (...)/wp-content/plugins/simple-twitter-connect/OAuth.php on line 82

    I solved the problem reverting back to older Google Analytics for WordPress plugin version

  5. pcsservices
    Member
    Posted 2 years ago #

    Hi

    How do you revert back if you can no longer get into the admin panel?

  6. Drunkard100
    Member
    Posted 2 years ago #

    I had the same issue chonazz. As for your issue pcsservices, what I did was remove the "google-analytics-for-wordpress" plugin folder using FTP. Do you have FTP access to your site? If not, you should set it up, it comes in handy for many instances, including things like this.

    Otherwise, you can revert to your site backup if you run regular backups.

  7. pcsservices
    Member
    Posted 2 years ago #

    Hey Drunkard - that worked. Thanks

    Guess I will revert back to the previous version.

  8. Steve
    Member
    Posted 2 years ago #

    Hi Folks,

    On all three of my sites, even after removing, or manually updating the plugin by FTP, I get this error when trying to get to the admin pages:

    "Not Found

    Sorry, but you are looking for something that isn't here."

    Have also disabled all the plugins by myPHPAdmin ... but no joy.

    Something, somewhere has become corrupted ... any hints on what it may be?

    Thanks.

  9. Steve
    Member
    Posted 2 years ago #

    Deleting and restoring the database does not help either.

  10. sudipto
    Member
    Posted 2 years ago #

    Same problem.....................
    This is classing with the Twit connect plugin on my site

  11. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    We're working on a fix, the twit connect plugin is coded crap because it doesn't check whether a class already exists, so it's actually their bug, but I'll work around it.

  12. Claude Vedovini
    Member
    Posted 2 years ago #

    Well, you obviously don't check if the class exist either...

    I solved the OAuthException issue by renaming it GA_OAuthException, this is only a temporary solution because this could happen with another class depending on the plugins you run.

  13. WandererLLC
    Member
    Posted 2 years ago #

    Good solution. I did the same thing. As soon as a new version of the plugin is released, it's safe to just upgrade and overwrite.

    Understand the concern about other plugins not following good practice. Since it's basically impossible to enforce that, maybe the best thing is to name plugin classes with odd prefixes. :-)

  14. Claude Vedovini
    Member
    Posted 2 years ago #

    AFAIK prefixing functions and classes with the plugin's name is what's recommended

  15. fanny-g
    Member
    Posted 2 years ago #

    I get another fatal error message :

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homez.309/roughdre/www/wp-content/plugins/google-analytics-for-wordpress/wp-gdata/wp-gdata.php on line 14

    what should I do ?

  16. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    fanny-g: you're on PHP4, get with the program and make sure you're running PHP5.

  17. JoeCottone
    Member
    Posted 2 years ago #

    Joost:

    Tried "upgrade automatically" for Google Analytics for WordPress.

    Got an error.

    Then get this error when I try to activate:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/theco68/public_html/wp-content/plugins/google-analytics-for-wordpress/wp-gdata/wp-gdata.php on line 14

    Running PHP 5.2.17

    So I deleted the plugin. Added it again - successful install.

    Tried to activate - get same error.

  18. JoeCottone
    Member
    Posted 2 years ago #

    Sorry, running php 4.4.9

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic