Skip to content

How to fix Piwik’s dashboard stuck on “Loading data…”

Lot’s of posts about Piwik these days ^^ So I recently migrated Piwik from a server to another, had a few initial issues, fixed them, went to sleep, and the morning after I had yet another new issue: the dashboard (you know, the page where you land just after connecting) was basically empty, showing nothing but the “Loading data…” message.

All the other tabs seemed to work fine. The only clue I could find about a possible fuck-up was in the system checks (Settings → Diagnostic → System Check), which indicated, in the File integrity section, that some Javascript file (dashboard.js I believe) was (much) larger than expected. A rapid search found a couple of pretty old tickets in Piwik’s bug tracker, basically suggesting to empty the template cache (that’s in the tmp/templates_c folder). Since the migration was very recent and I still had the former, working installation running on the “legacy” server, on which I could fall back to in case of a big screw-up, I decided it would be simpler to just to reinstalling Piwik and see if it would be possible/easy to hook it up to the current database.

So I grabbed the latest package (I wish they provided some tar.xz or tar.gz instead of a zip, btw……), started the install, carefully entering the same database info (db name, user, db table prefix, etc.) as the previous one, and the same master user too. It detected the previous tables and asked whether to erase or reuse them, of course I chose reuse. And short story short: it worked.

After I finished the installation, I went back to the dashboard and it loaded fine. I checked the File integrity section too, this time no issue there. Actually, I noticed that the menu in Settings was changed! Since I had been running this Piwik installation for about 3 years, I guess the fairly regular auto-upgrade routines corrupted a few things here and there during this time. Comparing the old folder with the new one indeed showed that the new one was a bit lighter, so there was definitely some leftover stuff from previous versions, I assume they ended up causing issues. Maybe even the DNT ignore thingy isn’t broken anymore now?
I didn’t check that, but anyhow, the conclusion of this is, when you have issues with Piwik and you have already run a few upgrades in the past, it’s worth trying to reinstall from scratch. The process is quick and easy (so long as you provide accurate database details – if you forgot them you will find them in your old config file, config/config.ini.php), and you’ll end up with a brand new Piwik on your populated database. The only case where I believe this could get complicated is, as usual (think phpBB, for instance) when you added custom plugins.

Posted in web development.

Tagged with .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA