WordPress.org

Forums

Google Analytics Dashboard for WP
[resolved] Graphs are not shown in dashboard admin in IE8 (10 posts)

  1. cybup
    Member
    Posted 2 years ago #

    Hello,

    Graphs are no longer shown in dashboard admin when using IE8 while everything seems to work well in IE9+.

    I'm using WP 3.5.1 with network/multisite enabled and latest version of Google Analytics Dashboard for WP.

    The error is as follows:
    "SCRIPT5022: Not a valid 2D array.
    format+en,default,corechart.I.js, line 60 character 63"

    Most of the discussions on such an error point to extra comma at the end of the last element in the array. Maybe this can provide some lead or information on how to resolve it in this plugin.

    Thanks!

    http://wordpress.org/plugins/google-analytics-dashboard-for-wp/

  2. Alin Marcu
    Member
    Plugin Author

    Posted 2 years ago #

    OMG, it does? i think i have that ending comma!

    I always thought that IE8 is just not supported, i will fix that on my next release.

    Thank you, You are a genius!

  3. cybup
    Member
    Posted 2 years ago #

    Thanks for your prompt response! Can you please share when you plan to release it? Any chance to get a temporary fix or guidance on where to look (what file/line)?

  4. Alin Marcu
    Member
    Plugin Author

    Posted 2 years ago #

    A new version is already scheduled for next week, which will also bring some new cool features.

    About the fix, from memory i can tell you that data is generated on some foreach loops, if you search them, you will see that those loops are always generating a trailing comma at the end. I can't give you more details because i'm not near a desktop right now!

  5. cybup
    Member
    Posted 2 years ago #

    yes, I already saw that in several places in your code (both ga_dash.php and functions.php). I removed the trailing commas and this cleared the error in IE8 and now all text data appears properly but the graphs are still not shown and there is no other error reported by IE console.
    Please also notice that after this change IE9+ still work properly so maybe there is additional IE8 specific issue besides the one I reported.

  6. Alin Marcu
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, you did, i have to either give up on foreach loop or to put an additional condition for the last element, where the comma should be removed. Removing the last comma for all elements will brick the chart's data.

  7. cybup
    Member
    Posted 2 years ago #

    In my test I used php rtrim() function immediately after each of the relevant loops (either foreach of while).

  8. cybup
    Member
    Posted 2 years ago #

    I suspect that the graphs are not shown after the fix I proposed only because I tested it using IE developer tools in a specific IE8 mode of operation. I'll recheck later on real IE8...

  9. cybup
    Member
    Posted 2 years ago #

    As promised I managed to check it on real IE8 and it works fine with the changes we discussed earlier! deconf, I hope you'll manage to include it in the upcoming release and maybe now you should consider mentioning IE8 support too (appears there are some people who still have it installed) :)

    Thanks for a great plugin and goodluck!

  10. Alin Marcu
    Member
    Plugin Author

    Posted 2 years ago #

    4.1 is available, including the fix you suggested!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics Dashboard for WP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic