Phoca Gallery Search Plugin HTTP-Error: 500 and no results

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
Ron
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 23 Feb 2011, 18:51
Location: Netherlands
Contact:

Phoca Gallery Search Plugin HTTP-Error: 500 and no results

Post by Ron »

Hello Jan,

I just installed the new Gallery Search Plugin on my site in development, but have some problems with it.

At first it doesn’t seem to give me any results from categories or image comments.
Second when on the search page I check only one of phoca, content, weblinks etc. the search results in a Server-error:500.

I’ve tried to:
Reinstall the plugin
Remove the HTACCESS file
But both end up with the same results

The errormsg gives me: Fatal error: Call to undefined function onContentSearchAreas() in /volume1/web/site/plugins/search/phocagallery/phocagallery.php on line 56 Fatal error: Class 'JLoader' not found in /volume1/web/site/libraries/loader.php on line 130

Can you give me a hint on the solution for this.

Thnx,
Last edited by Ron on 18 May 2011, 10:08, edited 1 time in total.
Ron
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 23 Feb 2011, 18:51
Location: Netherlands
Contact:

Re: Phoca Gallery Search Plugin HTTP-Error: 500 and no resul

Post by Ron »

Ron wrote:Hello Jan,

I just installed the new Gallery Search Plugin on my site in development, but have some problems with it.

At first it doesn’t seem to give me any results from categories or image comments.
Second when on the search page I check only one of phoca, content, weblinks etc. the search results in a Server-error:500.

I’ve tried to:
Reinstall the plugin
Remove the HTACCESS file
But both end up with the same results

The errormsg gives me: Fatal error: Call to undefined function onContentSearchAreas() in /volume1/web/site/plugins/search/phocagallery/phocagallery.php on line 56 Fatal error: Class 'JLoader' not found in /volume1/web/site/libraries/loader.php on line 130

Can you give me a hint on the solution for this.

Thnx,
The first problem seems to have somting to do with the languagfilter, if i disable the filter in the phocagallery.php by disabling lines 205 and 206 its works fine.

Code: Select all

// Filter by language
			if ($app->isSite() && $app->getLanguageFilter()) {
				$tag = JFactory::getLanguage()->getTag();
				//$query->where('a.language in (' . $db->Quote($tag) . ',' . $db->Quote('*') . ')');
				//$query->where('c.language in (' . $db->Quote($tag) . ',' . $db->Quote('*') . ')');
			}
The second problem i solved by adding this before onContentSearchAreas() on line 56 of phocagallery.php

Code: Select all

if (!array_intersect($areas, array_keys($this->onContentSearchAreas() ) ))
The only thing that confuses me at this moment is the language problem. I realy don't know what I'm doing wrong.
The images and categories both use all languages, so the resultpage should show them by default.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Search Plugin HTTP-Error: 500 and no resul

Post by Jan »

Hi, thank you for the info, the second problem I have changed (this) for info about the first problem, try to enable debug mode, so you will get info from the database.

Try to test version 3.0.1

Jan
If you find Phoca extensions useful, please support the project
Ron
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 23 Feb 2011, 18:51
Location: Netherlands
Contact:

Re: Phoca Gallery Search Plugin HTTP-Error: 500 and no resul

Post by Ron »

Thnx Jan,

You've pointed me the way, it seems that the language field in the category table contained empty values.
So the

Code: Select all

AND a.language in ('nl-NL','*') 
in the SQL SELECT CASE statement from the search plugin returned no data.
After changing the Language field values inide the Category table to '*' the search worked great.

Again thanks for your reply,
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Search Plugin HTTP-Error: 500 and no resul

Post by Jan »

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