Hi Phoca --
Sorry if this question has been asked before. I did several searches and couldn't find an answer which seemed to be for the same problem.
I'm running Phoca Download 3.0.6 in a slave site running on through the Joomla Multi Sites component on Joomla 3.4.3. PHP is 5.4.3.
I recently upgraded Phoca and I'm getting the following message when going to Components/Phoca Download/Files:
Warning: Invalid argument supplied for foreach() in /home/myaccount/domains/parentsite.com/subdomains/parentsite_dir/public_html/administrator/components/com_phocadownload/views/phocadownloadfiles/view.html.php on line 28
Count of not authorized file(s): 177
There is no list of files displayed on this page.
I checked the database status and have updated it in both parent and slave site. I also re-installed Phoca Download in the parent.
Can you please let me know how I can resolve this problem?
Thanks!
Invalid argument supplied/count of not authorized files
-
- Phoca Newbie
- Posts: 3
- Joined: 09 Jul 2015, 21:10
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Invalid argument supplied/count of not authorized files
Hi, this seems like database error, when you enable debug mode in Joomla! global configuration, do you get there any database error message (this should be displayed when the debug mode is enabled)
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 09 Jul 2015, 21:10
Re: Invalid argument supplied/count of not authorized files
Yes, thanks. When viewing the Phoca Download "Files" page in the admin area, Under Database Queries there were two or three duplicates found pertaining to the _phocadownload table: Unknown column 'a.userid' in 'on clause'Jan wrote:Hi, this seems like database error, when you enable debug mode in Joomla! global configuration, do you get there any database error message (this should be displayed when the debug mode is enabled)
Jan
Here's the first query:
Code: Select all
Duplicate queries: #12
SELECT a.*,l.title AS language_title,uc.name AS editor,uua.id AS uploaduserid, uua.username AS uploadusername, uua.name AS uploadname,ag.title AS access_level,c.title AS category_title, c.id AS category_id,ua.id AS userid, ua.username AS username, ua.name AS usernameno
FROM `bgj_phocadownload` AS a
LEFT JOIN `bgj_languages` AS l
ON l.lang_code = a.language
LEFT JOIN bgj_users AS uc
ON uc.id=a.checked_out
LEFT JOIN bgj_users AS uua
ON uua.id=a.userid
LEFT JOIN bgj_viewlevels AS ag
ON ag.id = a.access
LEFT JOIN bgj_phocadownload_categories AS c
ON c.id = a.catid
LEFT JOIN bgj_users AS ua
ON ua.id = a.owner_id
WHERE (a.published IN (0, 1))
GROUP BY a.id
ORDER BY a.title asc
Explain
Error
Unknown column 'a.userid' in 'on clause' SQL=EXPLAIN SELECT a.*,l.title AS language_title,uc.name AS editor,uua.id AS uploaduserid, uua.username AS uploadusername, uua.name AS uploadname,ag.title AS access_level,c.title AS category_title, c.id AS category_id,ua.id AS userid, ua.username AS username, ua.name AS usernameno FROM `bgj_phocadownload` AS a LEFT JOIN `bgj_languages` AS l ON l.lang_code = a.language LEFT JOIN bgj_users AS uc ON uc.id=a.checked_out LEFT JOIN bgj_users AS uua ON uua.id=a.userid LEFT JOIN bgj_viewlevels AS ag ON ag.id = a.access LEFT JOIN bgj_phocadownload_categories AS c ON c.id = a.catid LEFT JOIN bgj_users AS ua ON ua.id = a.owner_id WHERE (a.published IN (0, 1)) GROUP BY a.id ORDER BY a.title asc
Thanks
-
- Phoca Newbie
- Posts: 3
- Joined: 09 Jul 2015, 21:10
Re: Invalid argument supplied/count of not authorized files
I compared the _phocadownload tables in the master site and slave site databases and the number of tables is different. 55 tables in the master and 42 in the slave. The way JMS Multi Sites works is that the extensions must first be installed in the Master site, and then installed in the Slave. The extension files are symbolically linked from the Slave to the Master, but in my configuration, each Slave site has it's own separate database.
So, I just tried to "install" Phoca Download again in the Slave site, but once the installer ran, I got a blank white screen, instead of the success screen. And the database tables have not been updated in the Slave database. Any suggestions?
So, I just tried to "install" Phoca Download again in the Slave site, but once the installer ran, I got a blank white screen, instead of the success screen. And the database tables have not been updated in the Slave database. Any suggestions?
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Invalid argument supplied/count of not authorized files
Hi, blank page mostly means a php error: https://www.phoca.cz/documents/16-joomla ... rs-on-site
But this seems like the tables are there but with missing columns (no idea what could cause it).
So I would start with adding missing columns into the system - in database - e.g. per phpMyAdmin.
First with: userid column in table bgj_phocadownload
You can see all the tables and data in install file:
administrator/components/com_phocadownload/install/sql/mysql/install.utf8.sql
There are the column parameters for userid:
Jan
But this seems like the tables are there but with missing columns (no idea what could cause it).
So I would start with adding missing columns into the system - in database - e.g. per phpMyAdmin.
First with: userid column in table bgj_phocadownload
You can see all the tables and data in install file:
administrator/components/com_phocadownload/install/sql/mysql/install.utf8.sql
There are the column parameters for userid:
Code: Select all
`userid` int(11) NOT NULL default '0'
If you find Phoca extensions useful, please support the project