WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
[resolved] Google Analyticator conflict with WP Stats (6 posts)

  1. kgagne
    Member
    Posted 7 months ago #

    When I upgraded Google Analyticator from 6.4.5 to 6.4.7.1 on my WordPress 3.7.1 site, I encountered a conflict with this older plugin:

    http://lesterchan.net/portfolio/programming/php/#wordpress-wp-stats

    The text of the error was:

    Fatal error: Cannot redeclare stats_init() (previously declared in
    /wp-content/plugins/google-analyticator/google-analyticator.php: 117)
    in /wp-content/plugins/wp-stats/wp-stats.php on line 882

    I've deactivated WP Stats, but I'm wondering if there's a way to get them to play nice together.

    -Ken

    http://wordpress.org/plugins/google-analyticator/

  2. aredorange
    Member
    Posted 7 months ago #

    same problem here - I had to remove WP Stats in order for the whole site to work...

  3. jhayghost13
    Member
    Posted 7 months ago #

    @aredorange I solved this problem by changing the function name stats_init in line 113 and 116 to ganalyticator_stats_init. You can try my revised version by replacing your google-analyticator.php download here http://goo.gl/yMW1SX

  4. aredorange
    Member
    Posted 7 months ago #

    @jhayghost13 downloaded your version but still have problems if I keep WP Stats... after replacing the original google-analyticator.php with your version, I did upload again WP Stats and got the following message:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'ga_admin_init' not found or invalid function name in /home/redorang/public_html/wp-includes/plugin.php on line 429

    And when I tried to activate WP Stats, got the following:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'ga_admin_init' not found or invalid function name in /home/redorang/public_html/wp-includes/plugin.php on line 429

    Warning: Cannot modify header information - headers already sent by (output started at /home/redorang/public_html/wp-includes/plugin.php:429) in /home/redorang/public_html/wp-includes/pluggable.php on line 896

    Fatal error: Cannot redeclare stats_init() (previously declared in /home/redorang/public_html/wp-content/plugins/google-analyticator/google-analyticator.php:117) in /home/redorang/public_html/wp-content/plugins/wp-stats/wp-stats.php on line 882

    so, the only way forward for me is either to unistall Google Analyticator or WP Stats, as having both there is conflict...

    If you know how to solve this, would be much thankful for the solution...

  5. Video User Manuals
    Member
    Plugin Author

    Posted 6 months ago #

    This is fixed in the latest version.

  6. kgagne
    Member
    Posted 6 months ago #

    Awesome — thanks!

Reply

You must log in to post.

About this Plugin

About this Topic