Page 1 of 1

Files without "owner" do not show in List of Files (Category View)

Posted: 12 Dec 2021, 19:53
by adoucette
Hello,
First, thanks for the great file download component!
I have noticed that files in a menu item set to "Phoca Download ยป List of Files (Category View)" will not show up if the "Owner" is not set for the file. Only files with a listed owner will display.
How can I fix that to show all files (with or without owner), or rapidly set an owner for all the files?
I'm using Phoca 3.2.3 on Joomla 3.10.3.
Thanks again for this useful component,
Ari

Re: Files without "owner" do not show in List of Files (Category View)

Posted: 12 Dec 2021, 20:53
by adoucette
One thing I've done temporarily to address this is to 1) set a userid ("uploaded by") for files that do not yet have a userid set, and then set the owner_id ("Owner") to be the same as the userid where it is not yet set.
In phpMySQL I can run first:

Code: Select all

SELECT * FROM `phocadownload` WHERE 1;
UPDATE `phocadownload` SET `userid`=123 WHERE `userid`=0;
SELECT * FROM `phocadownload` WHERE 1;
then

Code: Select all

SELECT * FROM `phocadownload` WHERE 1;
UPDATE `phocadownload` SET `owner_id`=`userid` WHERE `owner_id`=0;
SELECT * FROM `phocadownload` WHERE 1;

Re: Files without "owner" do not show in List of Files (Category View)

Posted: 13 Dec 2021, 23:49
by Jan
Hi, I don't fully understand the problem. Testing now and get no such problem. When creating a menu link to Category View, all files, even public files are displayed there, no need to set ownership, :idea:

Jan

Re: Files without "owner" do not show in List of Files (Category View)

Posted: 15 Dec 2021, 03:29
by adoucette
What I experienced is that (all of) the files without an owner set would not display in the "List of Files (Category View)", and all of the files with an owner did display.
After setting an owner for some, then those subsequently displayed.
So I ran the above SQL to set an owner for those files which did not have one. Now all of the files display in the "List of Files (Category View)".

Re: Files without "owner" do not show in List of Files (Category View)

Posted: 15 Dec 2021, 14:06
by Jan
Hmmm, hard to say what can be wrong there, normally, all public files are displayes without "owner" parameter set :idea:

Like here:
https://www.phoca.cz/download/category/ ... -component

:idea:

Jan

Re: Files without "owner" do not show in List of Files (Category View)

Posted: 15 Dec 2021, 14:17
by adoucette
If it helps, the permission on the files was not public, but rather 'registered'

Re: Files without "owner" do not show in List of Files (Category View)

Posted: 15 Dec 2021, 14:28
by Jan
Ok, thank you for the info, I will take a loot at it.

Jan