Multiple 404 errors in Piwik

I just tried to add a new site to my Piwik installation (v3.1.1) but I keep getting 404 errors for certain specific files.

But they do exist in the correct folder. I confirmed it by taking the local path from the apache error log. I tried uploading some different files (.txt, .jpg) to that folder and they generate a 404 as well.

Some of the files are:
/piwik/plugins/SitesManager/templates/sites-list/add-site-link.html?cb=XXXXX
/piwik/plugins/SitesManager/templates/sites-list/add-entity-dialog.html?cb=XXXXX
/piwik/plugins/SitesManager/templates/sites-list/sites-list.html?cb=XXXXX

I never did any manual work on the Piwik files and have no third-party plugins. I did however install it years ago so the problem could be with one of the updates.

Where could the source for that problem be? What could I do to further debug the cause?
I thought about completely reinstalling Piwik but since I don’t know where the problem lies I don’t know if my data would be safe…

Thanks for any help.

Hi,

Your data is save, if you follow this manual: Update Piwik - Analytics Platform - Piwik

I suspect that the 404 errors are because of a .htaccess config.

But where do you get those 404? In theory those files shouldn’t be accessed in the browser.

Thanks for the quick answer.

I got the error in Settings => Websites => Manage (https://MY_SITE/piwik/index.php?module=SitesManager&action=index&showaddsite=1&period=range&date=last30&idSite=1).

Initiator stack trace:
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:228
q @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:223
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:221
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:255
$digest @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:266
$apply @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:269
l @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:221
s.onload @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:227
XMLHttpRequest.send (async)
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:228
q @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:223
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:221
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:255
$digest @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:266
$apply @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:269
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:141
invoke @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:163
c @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:141
Uc @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:141
xe @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:140
(anonymous) @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:452
i @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:4
fireWith @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:4
ready @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:4
J @ index.php?module=Proxy&action=getCoreJs&cb=9bf60c2…:4

After some clicking around in the settings I discovered a similar error under Websites => Settings. There the missing files are:
/piwik/plugins/SitesManager/templates/help/excluded-ip-help.html
/piwik/plugins/SitesManager/templates/help/excluded-query-parameters-help.html
/piwik/plugins/SitesManager/templates/help/excluded-user-agents-help.html
/piwik/plugins/SitesManager/templates/help/timezone-help.html

The other pages seem to load fine.

I didn’t change the Piwik .htaccess files and already tried modifying/deleting all .htaccess files that could have an influence but I still get the error.

I’m gonna try reinstalling Piwik and see if that solves my problem.

So I just uploaded the newest Piwik versions and it seems to work fine now. To be safe I installed it in a separate folder since the old installation had some files that were no longer needed and that the updates didn’t remove.

BTW Those HTML templates are still loaded with AJAX on the website management page so I guess that’s normal.