WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
[resolved] Dashboard widget stopped working (19 posts)

  1. dancriel
    Member
    Posted 1 year ago #

    I see the following in my error log:

    PHP Fatal error: GoogleAnalyticsSummary::getVisitsGraph() [<a href='googleanalyticssummary.getvisitsgraph'>googleanalyticssummary.getvisitsgraph</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;Google_GaData&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /wp-content/plugins/google-analyticator/google-analytics-summary-widget.php on line 242

    Did Google's API change again? This happening for anyone else?

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

  2. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    I don't see that on any of our installations.

    Did you try to deauthorize and reauthorize again?

    Brian

  3. dancriel
    Member
    Posted 1 year ago #

    Yes I tried that and I get the same error...is there any additional debug info I can provide to help troubleshoot?

  4. dancriel
    Member
    Posted 1 year ago #

    I tried deauth / reauth a few more times and it eventually started working.

  5. dancriel
    Member
    Posted 1 year ago #

    And 15 minutes later it is failing again with the same error as before. Help?

  6. dancriel
    Member
    Posted 1 year ago #

    I have 2 sites in GA with the same name, though the UIDs are unique the "name" of the 2 sites are the same... could this be related? The GA tracking code is working properly, only the dashboard widget is broken.

  7. Phail
    Member
    Posted 1 year ago #

    Same here. If I have the widget installed then the site has no content from my pages. If I remove it then the site is normal.

    Edit:

    oops, strike that. I saw widget and was thinking sidebar widgets. For me the sidebar widget breaks the site.

    (I don't see a way to delete a post, so I edited my comment)

  8. dancriel
    Member
    Posted 1 year ago #

    Update: I determined that the failure was occurring while trying to retrieve cached GA data from the DB. As a workaround, I stopped the dashboard widget from attempting to use cached data so it makes a fresh call each time. In google-analytics-summary-widget.php I commented out lines 210, 282, 358, 453, and 505. Now my dashboard summary widget works again.

  9. dancriel
    Member
    Posted 1 year ago #

    In case Brian is still monitoring this thread, I had to make another small change to this plugin to get it working properly with my site.

    In google-analyticator.php on line 456 the plugin attempts to auto-select a GA account whose 'name' matches that of your site. As I mentioned earlier in this thread somehow I have 2 GA accounts with the same name, and that line of code was causing the HTML <select> element at the top of the plugin settings page to render with two options selected at the same time. Like this:

    <option value="UA-[...]-1" selected="selected">www.mysite.com</option>
    <option value="UA-[...]-2" selected="selected">www.mysite.com</option>

    Brian, thanks for the great plugin, greatly appreciate you keeping it up to date with Google's fluctuating API.

  10. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks so much for letting us know.

    We will take a look at this.

    Great to have such detailed feedback.

  11. wpriley
    Member
    Posted 1 year ago #

    FYI - I have exactly the same error. This plug-in worked without error the last time I visited the dashboard (a few weeks ago).

  12. dancriel
    Member
    Posted 1 year ago #

    Just dropping by this thread again to say that all the problems I outlined in my posts above still exist with plugin version 6.4, and the same fixes (hacks) that I provided can be re-applied if your dashboard widget stops working after the update.

    The line numbers have changed, but you can open google-analytics-summary-widget.php, search for the word "unserialize", and comment out each line that begins with $cached = maybe_unserialize(... there should be 4 instances.

  13. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi dancriel -

    sorry I missed the 2nd part to your post. I thought we had the dropdown bug sorted (which we do).

    I'll take a quick look at this now for you and release a patch.

    Ben

  14. devrap
    Member
    Posted 1 year ago #

    My dashboard widget stopped working as well, though I'm not seeing an error displaying--the widget just hangs at "loading." Anyone else getting this?

    A look at my log shows this, though I'm not certain it's from this plugin:
    _transient_timeout_dash_de3249c4736ad3bd2cd29147c4a0d43e deleted.

    Not sure if this is the same error or fix that dancriel describes.

    Many thanks for any info.

  15. moi-jeux
    Member
    Posted 1 year ago #

    for me too, Google Analyticator make bug with widget...

  16. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi @devrap

    Are you still having the problem? Yes we are using transients to store the data from google, for around 12hours I think.

    If you have WP_DEBUG enabled, we don't use the transient. If you wanted to turn on WP_DEBUG that will show if the transient is causing the issues.

    Hi @moi-jeux

    Can I have some more information?

    Cheers

  17. devrap
    Member
    Posted 1 year ago #

    Hi, VUM--

    Actually, the widget seems to have spontaneously started working on the 6th (not sure why, as nothing had changed in our wp-config, which didn't have WP_DEBUG enabled; however, we *did* install a debug log plugin, which has likely enabled WP_DEBUG elsewhere). All seems to work great now. I especially love and appreciate the feature of this being readily available for editors and not just admins.

    Great plug-in. Thanks for the followup!

  18. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Brilliant - thanks for letting us know devrap!

    Ben

  19. moi-jeux
    Member
    Posted 1 year ago #

    The new version is ok.. very good !!! Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.