• Resolved cizsolt

    (@cizsolt)


    Hi,

    There is something broken in my admin backend of WPP as I am unable to load any top lists on the plugin’s Stats page (Most viewed, Most commented, etc.). All I can see is a loading/spinning icon and the posts/pages are not appearing. I can see an error popping up in the console log:

    TypeError: undefined is not an object (evaluating ‘hex.replace’) – HexToRGB chart.js line 111.

    Thank you for any suggestions in advance,
    Zsolt.

Viewing 2 replies - 16 through 17 (of 17 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Well, I’ll be damned. It was that hahaha.

    I’m 90% sure that back when I built the Statistics dashboard (September 2017) every admin color scheme had four colors (too lazy to install an older version of WordPress to confirm). There’s also a good chance that I might be wrong about that, that Modern has always have only three colors and that this whole issue is completely my fault (it’s still my fault, but even more so if that was the case).

    The code that renders the Stats chart uses the last two colors of the user’s selected color scheme to style the chart. Modern only has three colors, and when the code tries to use the fourth color (missing in Modern) then, well, a JS error happens which breaks the rest of the script ??

    I would have never noticed that on my own so thank you really for helping out with this! I finally fixed that issue after so long! Will publish version 5.4.2 as soon as possible (will probably wait for a bit, would hate to have to release 5.4.2 so soon and just to fix one issue hehe).

    In case you’re curious / don’t want to wait until 5.4.2 is officially released, this is the commit that fixes the bug: Fixes Stats chart not loading for some users.

    Thread Starter cizsolt

    (@cizsolt)

    I’m glad I could help you identify the issue and you managed to fix it so fast! Thanks for the details, so it’s quite understandable why it didn’t work with the Modern scheme ??

    Thanks for the awesome plugin!

    Zsolt

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Admin backend not displaying top lists’ is closed to new replies.