Page 1 of 1

[Solved] issue with Phoca Gallery Finder Plugin

Posted: 01 Nov 2013, 09:28
by Brujo
Hi,

when I run the finder_indexer.php from the /cli folder manualy i get this errors & warnings

1.
PHP Fatal error: Class 'PhocaDownloadRoute' not found in /httpdocs/plugins/finder/phocagallerycategory/phocagallerycategory.php on line 146
Fatal error: Class 'PhocaDownloadRoute' not found in /httpdocs/plugins/finder/phocagallerycategory/phocagallerycategory.php on line 146

looks like a typo in line 146: insteed PhocaDownloadRoute' it should be PhocaGalleryRoute'

2.
* Processed batch 1 in 0.64 seconds.
PHP Warning: Invalid argument supplied for foreach() in /httpdocs/plugins/content/phocagallery/phocagallery.php on line 893
Warning: Invalid argument supplied for foreach() in /httpdocs/plugins/content/phocagallery/phocagallery.php on line 893

any hint?

Re: issue with Phoca Gallery Finder Plugin

Posted: 01 Nov 2013, 22:30
by Jan
Hi,

1) yes, typo error, should be fixed, try to install: https://www.phoca.cz/download/category/8 ... der-plugin version 4.0.3

2) for now known issue, I am still trying to find why Joomla! loads content plugin while making finder index :-(

Please try to install the 4.0.3 and let me know.

Thank you, Jan

Re: issue with Phoca Gallery Finder Plugin

Posted: 02 Nov 2013, 09:27
by Brujo
Hi Jan,

1) issue is fixed with 4.0.3
2) still exitst - since it is a warning i cant see more details or why it is used

greetings Brujo

Re: issue with Phoca Gallery Finder Plugin

Posted: 04 Nov 2013, 20:35
by Jan
Hi, can you paste a screenshot on which place the warning is displayed :idea:

Jan

Re: issue with Phoca Gallery Finder Plugin

Posted: 04 Nov 2013, 23:03
by Brujo
Hi Jan,

I did the following steps: open a shell on the Webserver and go to the documentroot of joomla > /cli folder where the finder_indexer.php located is and start it on cli like: php finder_indexer.php.
see: Smart Search indexing
-bash-4.1$ php finder_indexer.php
Smart Search INDEXER
============================

Starting Indexer
Setting up Finder plugins
Setup 5014 items in 0.1 seconds.
* Processed batch 1 in 0.625 seconds.
PHP Warning: Invalid argument supplied for foreach() in /path/of/my/domain/httpdocs/plugins/content/phocagallery/phocagallery.php on line 893

Warning: Invalid argument supplied for foreach() in /path/of/my/domain/httpdocs/plugins/content/phocagallery/phocagallery.php on line 893
* Processed batch 2 in 0.276 seconds.
* Processed batch 3 in 1.039 seconds.
* Processed batch 4 in 1.14 seconds.
* Processed batch 5 in 1.004 seconds.
^C
-bash-4.1$
I hope that you are able to follow it.

thanks Brujo

Re: issue with Phoca Gallery Finder Plugin

Posted: 05 Nov 2013, 19:55
by Jan
Hi, unfortunately I have no experiences with automatically creating of the index, only with the manual. But this should not matter. The problem is, why such process runs the content plugin code. Content plugin codes should be run only in article - in content, not in some process which does not have any dependency to the plugin ... I will try to find the solution, my idea is that the process tries to include plugin (which is really confusing) so the plugin should get the following code (to be set outside this process):

Code: Select all

// Don't run this plugin when the content is being indexed
		if ($context == 'com_finder.indexer')
		{
			return true;
		}
Please, open the plugin code and add this code after:

Code: Select all

public function onContentPrepare($context, &$article, &$params, $page = 0) {
and let me know, if this will help, I will add this protection to this plugin.

Thank you, Jan
Jan

Re: issue with Phoca Gallery Finder Plugin

Posted: 05 Nov 2013, 23:49
by Brujo
I did what you proposed and it seem the warning is gone. Cant see any side effect yet. Will do some more tests and check..

thanks Juergen

Re: issue with Phoca Gallery Finder Plugin

Posted: 07 Nov 2013, 02:21
by Jan
Ok