Hello,
If a file does not exist anymore, when the counter is reset, the entry for this user still remains in the list.
Uploading multiple files that were deleted later results in a growing list of entries with the same username.
To reproduce this follow the steps below:
1. Upload a file (e.g. for userX)
2. Download this file (so the download counter for userX is incremented by 1)
3. Delete this file (because you probably don't want to keep it)
4. Go to control center -> downloads and select the entry 'userX'
5. Click 'Reset'
The result is as follows (after let's say 5 uploaded and then deleted files):
USER = userX, FILE = (), COUNT = 0
USER = userX, FILE = (), COUNT = 0
USER = userX, FILE = (), COUNT = 0
USER = userX, FILE = (), COUNT = 0
USER = userX, FILE = (), COUNT = 0
I would expect the entire entry / entries to be removed if an uploaded file no longer exists.
Regards Mike
Phoca Download - Faulty behavior of 'reset downloads' function in control center
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hi, can you paste a screenshot of which view you exactly mean?
If you find Phoca extensions useful, please support the project
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hi Jan,
here is what you might want to see
I put together three screenshots in one so you can see step-by-step what happens.
Regards Mike
here is what you might want to see
I put together three screenshots in one so you can see step-by-step what happens.
Regards Mike
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hi, thank you very much, now I understand, I will take a look at it for the next version.
Thank you, Jan
Thank you, Jan
If you find Phoca extensions useful, please support the project
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
--- You're very welcome ---
Regards Mike
Regards Mike
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hi,
try to dwonload version 3.1.9. It should be OK there:
https://www.phoca.cz/download/category/ ... -component
Jan
try to dwonload version 3.1.9. It should be OK there:
https://www.phoca.cz/download/category/ ... -component
Jan
If you find Phoca extensions useful, please support the project
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hi Jan,
thank you for your reply.
I have just installed v3.9.1 but I cannot see any difference - too bad !
There are still all the entries with the empty brackets ().
Regards Mike
thank you for your reply.
I have just installed v3.9.1 but I cannot see any difference - too bad !
There are still all the entries with the empty brackets ().
Regards Mike
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hi, this could be old data in database. Does it happen to newly removed data (create a file, download a file, delete a file)?
Jan
Jan
If you find Phoca extensions useful, please support the project
- madmetz
- Phoca Member
- Posts: 34
- Joined: 08 Apr 2019, 16:20
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hi Jan,
Before my last try with v3.1.9, I cleaned the database manually by deleting the appropriate entries.
(There is no way to do this by phoca download instructions.)
But the effect remains the same as before.
Regards Mike
Before my last try with v3.1.9, I cleaned the database manually by deleting the appropriate entries.
(There is no way to do this by phoca download instructions.)
But the effect remains the same as before.
Regards Mike
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Download - Faulty behavior of 'reset downloads' function in control center
Hmmm, testing now on different servers
Download statistics:

After reseting the count of downloads:

After deleting the test.zip file:

After deleting both:

Does your Phoca Download include the following code in file:
administrator/components/com_phocadownload/models/phocadownloadfile.php
https://github.com/PhocaCz/PhocaDownloa ... ca993c7ffb
(see the right side: below the comment //Delete files from statistics table)
This query just delete items in statistics table when the files are deleted.
?
Download statistics:

After reseting the count of downloads:

After deleting the test.zip file:

After deleting both:

Does your Phoca Download include the following code in file:
administrator/components/com_phocadownload/models/phocadownloadfile.php
https://github.com/PhocaCz/PhocaDownloa ... ca993c7ffb
(see the right side: below the comment //Delete files from statistics table)
This query just delete items in statistics table when the files are deleted.
?
If you find Phoca extensions useful, please support the project