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

Phoca Download - download manager
adoucette
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 02 Aug 2014, 16:11

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

Post 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
adoucette
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 02 Aug 2014, 16:11

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

Post 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;
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
adoucette
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 02 Aug 2014, 16:11

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

Post 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)".
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
adoucette
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 02 Aug 2014, 16:11

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

Post by adoucette »

If it helps, the permission on the files was not public, but rather 'registered'
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Ok, thank you for the info, I will take a loot at it.

Jan
If you find Phoca extensions useful, please support the project
Post Reply