Page 1 of 2

4.0 Alpha 3 - Creation error

Posted: 19 Jan 2013, 13:10
by AnGL
I try to use 4.0 alpha3 release for Joomla 3.0.2.
Then I try to create:

1. Image:
Warning: Invalid argument supplied for foreach() in /www/vhosts/.../administrator/components/com_phocagallery/views/phocagalleryimgs/view.html.php on line 32

2. Category:
500 SQL=SELECT a.*,l.title AS language_title,uc.name AS editor,ag.title AS access_level,c.title AS parentcat_title, c.id AS parentcat_id,ua.id AS userid, ua.username AS username, ua.name AS usernameno,v.average AS ratingavg,cc.countid AS countid FROM `jos_phocagallery_categories` AS a LEFT JOIN `jos_languages` AS l ON l.lang_code = a.language LEFT JOIN jos_users AS uc ON uc.id=a.checked_out LEFT JOIN jos_viewlevels AS ag ON ag.id = a.access LEFT JOIN jos_phocagallery_categories AS c ON c.id = a.parent_id LEFT JOIN jos_users AS ua ON ua.id = a.owner_id LEFT JOIN jos_phocagallery_votes_statistics AS v ON v.catid = a.id LEFT JOIN (SELECT cc.parent_id, count(*) AS countid FROM jos_phocagallery_categories AS cc GROUP BY cc.parent_id ) AS cc ON a.parent_id = cc.parent_id GROUP BY a.id ORDER BY

Do you have any idea to fix it?
Thank you

Re: 4.0 Alpha 3 - Creation error

Posted: 20 Jan 2013, 18:11
by Jan
Hi, try to uninstall the gallery and reinstall, seems like there is some problem with phoca gallery tables in your database.

Re: 4.0 Alpha 3 - Creation error

Posted: 20 Jan 2013, 18:35
by janne
Hi
I also have the exact same problems.
I have had it all time since alpha 1, I tried uninstall and delete the tables but nothing seems to work.
I think its something in the joomla setup, maybe the language.

Janne

Re: 4.0 Alpha 3 - Creation error

Posted: 20 Jan 2013, 19:19
by Jan
Hmmm, really no idea what can be wrong there,

try to open:
administrator\components\com_phocagallery\models\phocagalleryimgs.php

and add:

Code: Select all

print_r($this->state->get('list.ordering'));
print_r($this->state->get('list.direction'));
before:

Code: Select all

$query->order($db->escape($orderCol.' '.$orderDirn));
cca line 186

You should get: a.titleasc (a.title asc) string at the top of the site (under the menu). If not, then there is something wrong with states in your Joomla! :idea:

Re: 4.0 Alpha 3 - Creation error

Posted: 20 Jan 2013, 20:19
by janne
I added the rows to phocagallerycs.php and when I enter the category form I get a.titleasc just under the menu.
I dont know if this test is good enough but it seems like the state is OK.

Re: 4.0 Alpha 3 - Creation error

Posted: 20 Jan 2013, 20:21
by Jan
Hi, this means, in such case you cannot get empty "ORDER BY ..." but "ORDER BY a.title asc"

Do you still get the error message with the sql query? If yes, try to copy the query and add it to sql query window in your phpmyadmin, maybe you will get more information about the problem :idea:

Jan

Re: 4.0 Alpha 3 - Creation error

Posted: 20 Jan 2013, 20:39
by janne
Sorry Jan but I still get the error and I have copied the query and tried it in phpmyadmin.
The select works if I get rid of the empty ORDER BY

I mailed you earlier about this but I haven’t found any solution for the empty ORDER BY.

Re: 4.0 Alpha 3 - Creation error

Posted: 28 Jan 2013, 12:47
by AnGL
Jan wrote:Hmmm, really no idea what can be wrong there,

try to open:
administrator\components\com_phocagallery\models\phocagalleryimgs.php

and add:

Code: Select all

print_r($this->state->get('list.ordering'));
print_r($this->state->get('list.direction'));
before:

Code: Select all

$query->order($db->escape($orderCol.' '.$orderDirn));
cca line 186

You should get: a.titleasc (a.title asc) string at the top of the site (under the menu). If not, then there is something wrong with states in your Joomla! :idea:

Thank you, but it doesn't help

Re: 4.0 Alpha 3 - Creation error

Posted: 28 Jan 2013, 13:10
by AnGL
Jan wrote:Hi, try to uninstall the gallery and reinstall, seems like there is some problem with phoca gallery tables in your database.
It doesn't help too. I tried to unstall and delete tables from MySQL admin ...

Re: 4.0 Alpha 3 - Creation error

Posted: 29 Jan 2013, 20:02
by Jan
Hi, I made some changes in controller so maybe this help, please wait until the gallery will be Beta. Then please test it and let me know (I hope I will finish the Beta soon)

Jan