Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating to 4.0.5, plugin file VisitsByDaysSinceLastVisit.php is not deleted #16927

Closed
nkfilis opened this issue Dec 9, 2020 · 4 comments
Assignees
Milestone

Comments

@nkfilis
Copy link

nkfilis commented Dec 9, 2020

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.

@sgiehl
Copy link
Member

sgiehl commented Dec 9, 2020

@tsteur Seems we are having similar issues with various removed dimensions. Do you think it would maybe make sense to have some kind of dimension integrity checker, that holds a list of dimensions that should have been removed through an update and would remove it from the list of used dimensions if it's still there, so it can't make any problems?

@sgiehl
Copy link
Member

sgiehl commented Dec 9, 2020

@tsteur created a simple draft on this branch: https://github.com/matomo-org/matomo/compare/removedimensions.
Guess might be useful as it seems to happen for wordpress plugin as well. See matomo-org/matomo-for-wordpress#393
Other option might be to clean up the options table, so the columns are actually not listed there anymore. But that would trigger the updater to add them again if they are not deleted...

@tsteur tsteur added this to the 4.0.3 milestone Dec 9, 2020
@tsteur
Copy link
Member

tsteur commented Dec 9, 2020

@sgiehl sounds good. We maybe also want to document somewhere (or have a test if possible) to add future removed dimensions to that list

@sgiehl
Copy link
Member

sgiehl commented Jan 4, 2021

I'll close this issue. With #16934 it should no longer be a problem if a dimension file isn't removed correctly. Matomo will still run correctly and the Integrity checker should suggest to remove the file manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants