petgus
December 16, 2020, 8:09am
1
Upgraded from v3.14.1 to v4.0.5
Downloaded zip and copied all files to wwwroot (did not remove any of the old v3.14.1 files).
All upgrade steps was executed successfully with no errors.
However I’m getting a php error when requesting the tracker URL below.
Request:
https://matomo.iaf.se/matomo.php?action_name=Start&idsite=1&rec=1&r=809934&h=8&m=51&s=33&url=https%3A%2F%2Fwww.iaf.se%2F&_id=c5df27499ebbe19e&_idn=0&_refts=1608103365&_ref=https%3A%2F%2Farbetsformedlingen.se%2F&send_image=0&pdf=1&qt=0&realp=0&wma=0&fla=0&java=0&ag=0&cookie=1&res=1920x1080&pv_id=ppWfUC&pf_net=0&pf_srv=33&pf_tfr=92&pf_dm1=607
Fatal error : Uncaught Error: Call to undefined method Piwik\Tracker\Request::getDaysSinceLastVisit() in C:\inetpub\wwwroot\matomo\matomo\plugins\VisitorInterest\Columns\VisitsByDaysSinceLastVisit.php:38 Stack trace: #0 C:\inetpub\wwwroot\matomo\matomo\core\Tracker\Visit.php(499): Piwik\Plugins\VisitorInterest\Columns\VisitsByDaysSinceLastVisit->onNewVisit() #1 C:\inetpub\wwwroot\matomo\matomo\core\Tracker\Visit.php(302): Piwik\Tracker\Visit->triggerHookOnDimensions() #2 C:\inetpub\wwwroot\matomo\matomo\core\Tracker\Visit.php(209): Piwik\Tracker\Visit->handleNewVisit() #3 C:\inetpub\wwwroot\matomo\matomo\core\Tracker.php(160): Piwik\Tracker\Visit->handle() #4 C:\inetpub\wwwroot\matomo\matomo\core\Tracker\Handler.php(55): Piwik\Tracker->trackRequest() #5 C:\inetpub\wwwroot\matomo\matomo\core\Tracker.php(140): Piwik\Tracker\Handler->process() #6 C:\inetpub\wwwroot\matomo\matomo\core\Tracker.php(115): Piwik\Tracker->track() #7 C:\inetpub\wwwroot\matomo\matomo\piwik.php(73): Piwik\Tracker->main() #8 C:\inetpub\wwwroot\matomo\m in C:\inetpub\wwwroot\matomo\matomo\plugins\VisitorInterest\Columns\VisitsByDaysSinceLastVisit.php on line 38
petgus
December 16, 2020, 8:50am
2
Seems there was some files from Matomo 3 that needed to be deleted
Resolved issue by
deleting all files in wwwroot
Copying matomo 4 files to wwwroot
adding back config.ini
Lukas
(Lukas Winkler)
December 17, 2020, 11:54am
3
Hi,
For future reference, this seems to be this issue:
opened 02:28PM - 09 Dec 20 UTC
closed 01:09PM - 04 Jan 21 UTC
After upgrading from 3.5.x to 4.0.5 today, the `console queuedtracking:process` … died with this error:
```
Starting to process request sets, this can take a while
Uncaught exception in /path/to/matomo/installation/plugins/VisitorInterest/Columns/VisitsByDaysSinceLastVisit.php line 38:
Call to undefined method Piwik\Tracker\Request::getDaysSinceLastVisit()
```
It seems, the plugin was updated, but an old file wasn't deleted:
```
plugins/VisitorInterest/Columns:
total 27
-rw-r--r-- 1 www www 366 Dec 8 22:07 PagesPerVisit.php
-rw-r--r-- 1 www www 412 Dec 8 22:07 VisitDuration.php
-rw-r--r-- 1 www www 671 Dec 8 22:07 VisitorDaysSinceLast.php
-rw-r--r-- 1 www www 1963 Dec 8 22:07 VisitorSecondsSinceLast.php
-rw-r--r-- 1 www www 1062 Sep 23 23:20 VisitsByDaysSinceLastVisit.php
-rw-r--r-- 1 www www 371 Dec 8 22:07 VisitsbyVisitNumber.php
```
At least, after moving the file elsewhere, everything went thru fine. Maybe an issue with the plugin update?
I'm not 100% sure, which version I was upgrading from, but I see this in the terminal buffer: `Matomo database will be upgraded from version 3.14.1 to the new version 4.0.5.`
But starting with fresh files is a good way to circumvent such issues.