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

Manually removing files #11256

Closed
ohreally opened this issue Jan 22, 2017 · 11 comments
Closed

Manually removing files #11256

ohreally opened this issue Jan 22, 2017 · 11 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@ohreally
Copy link

ohreally commented Jan 22, 2017

It seems that after every upgrade some files need to be removed manually to make Piwik run again.
After having used Piwik for quite some years, and another upgrade (2.16 → 3.01) that brought my Piwik installation to it's knees, I thought I'd do a big cleanup.

Before I start removing files, I'd like your advice.
This is the strategy I came up with:

Create a list of all the files in my installation:

cd <piwik dir>/
find . -print | sort > ~/piwik.me.files

Download the latest version from GitHub, extract it, and create a list of files in that version (same commands, different filename).

Find the difference between the 2, and delete files that no longer exist:

comm -23 ~/piwik.me.files ~/piwik.github.files

First question is 'Would this be the way to go?'.

If so, then please advice on how to use common sense with this list. E.g.

Ignore all .png files, as we replaced .gif with .png.

Ignore plugins/* except plugins/CorePluginsAdmin/*

etc.

Thank you.

@ohreally
Copy link
Author

Adding my list as an example.
piwik_gone_files.txt

@Findus23
Copy link
Member

Findus23 commented Jan 22, 2017

Another idea: What's wrong with replacing the old piwik folder with the latest piwik version (from https://piwik.org/download/)
and just keeping the config in config/config.ini.php?
(Serious question, I might be missing some important files, that might get lost this way)
refs #11132

lost files:

@ohreally
Copy link
Author

That might be a solution, too, but I manage all my installed applications through DirectAdmin/Installatron, which is the way my hosting provider works.
And yes: I do have shell access, but I still prefer to manage everything (or as much as possible) centralized. Also, I'd like to provide my hosting provider with a workable solution for his DA users who do not have shell access (or shell knowledge).

@ohreally
Copy link
Author

Seriously? Nobody?
There is not a single Piwik developer who could help me generate a list of files that should (or should not) be in my installation? This worries me a little...

@sgiehl
Copy link
Member

sgiehl commented Jan 28, 2017

How are you updating Piwik? The automatic process should remove all unneeded files. If not there might be insufficent access writes.
The solution suggest by @Findus23 should work. Using Git downloads to compare might not be the best solution, as Git does not include vendor libs.

@Globulopolis
Copy link
Contributor

If not there might be insufficent access writes.

I have Apache runing on Windows platform and the web-server have full access rights to filesystem, but Piwik cannot delete these files and file integrity check failed.

@ohreally
Copy link
Author

And I run Apache on Linux (CentOS), and my web server also has full access.

Could you please tell me which file/script does the unneeded-files-check for the automated update process? That should help me get my 2 Piwik installations back up and running, that have been down for a week now.

@Findus23
Copy link
Member

That should help me get my 2 Piwik installations back up and running, that have been down for a week now.

What is the error message you get? Maybe it doesn't even have to do with unneeded files and can be simply solved.
What happens if you use a fresh install (as I mentioned before)

@ohreally
Copy link
Author

The error I get this time is "Error: ViewDataTable ID 'table' is already in use!".
The solution should be to delete plugins/CoreVisualizations/Visualizations/HtmlTable/PivotBy.php, as a websearch tells me.

For my other installation I don't remember the error message, but the solution was to delete plugins/Goals/Reports/BaseGoal.php (I think). Which I did, and I now have my dashboard back, but no hits have been recorded for a week.

For previous update errors I've had to delete plugins/CorePluginsAdmin/Tasks.php (I think), or manually empty the cache.
I don't remember the exact errors before that, but I run into trouble with almost every Piwik update, and the solution is always to manually delete files.
And since search engines always know which file(s) to delete, I know I'm not the only one running into this problem.

I haven't tried a fresh install, but I guess things would work then, because there wouldn't be any left-behind files.

@ohreally
Copy link
Author

No answer is also an answer.
Apparently there is no way to generate a list of files that do or do not belong in my installation.
And apparently Piwik insists on including/requiring files it doesn't need.
After 3 weeks without statistics, I just switched statistics providers.
As far as I'm concerned, you may close this issue.

@tsteur
Copy link
Member

tsteur commented Feb 12, 2017

The system check in Piwik 3 should tell you which files need to be deleted. You can see it by going to Administration => System Check.

@tsteur tsteur closed this as completed Feb 12, 2017
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

5 participants