Piwik (2.0 and 2.0.1) stopped working

Hi guys,

I updated to Piwik 2.0 and got a few errors.

First error: Each day started with over 50 visitors. Like 37 google organic, 7 google images, 8 bing… etc.

Steps to (unsuccessfully) solve it:

  1. I removed all tmp folders. No change.
  2. I deleted the entire Piwik folder and uploaded a fresh downloaded installation. No change.
  3. I deleted entire Piwik folder and downgraded to latest 1.* version but then I lost all my history. The furthest day I could look back was a day before.
  4. I removed all tmp folders again. No change.
  5. I deleted the entire MySQL piwik database, the user and anything that had anything to do with Piwik. Also the Piwik folder on harddrive.
  6. Fresh install of DB user, DB and Piwik folder.
  7. Same error.
  8. Updated to 2.0.1 and it got worse. Same error as before and after 6 hours Piwik stopped tracking almost entirely. Only the real time widgets work. Anything else stopped.
  9. Stopped trying to fix.

Any idea to fix it?

I think you’re experiencing this bug: Timezone bug? Visits being reported on the correct hour · Issue #4380 · matomo-org/matomo · GitHub

Stay tuned …

Yeah, looks like the “first error” is time zone related.

But the second error (which started with Piwik 2.0.1), which shows only live tracking but no regular tracking anymore, is not related to the time zone bug.

We think we have found the issue! Can you please apply following change. Open file core/DataAccess/LogAggregator.php
replace at line 149

$this->dateStart = $params->getPeriod()->getDateStart();
        $this->dateEnd = $params->getPeriod()->getDateEnd();


$this->dateStart = $params->getDateStart();
        $this->dateEnd = $params->getDateEnd();

(source = Fixes #4380, make sure site's timezone is applied when selecting log … · matomo-org/matomo@2f3bb08 · GitHub)

Then either delete the piwik_archive_*_2013_12 , or wait up to 24 hours to see if the bug is fixed.

Does it fix it?

Hello Matt, I just saw your message.

Regardless your fix I’ve just updated piwik to 2.0.2 and so far it seems to be promising. It’s tracking and numbers seem to be fine.

Do you still want me to apply your fix?