Page 1 of 1

Fatal error when using RT Rocksprocket

Posted: 06 Mar 2013, 17:37
by Aladdin
Hi
Using Phoca gallery plugin for last 5 years . Great component and plugin.

Recently I use RT Rocksprocket module .When I want to add an article to module , following error occurs related to the Phoca Gallery Plugin.


Fatal error: Call to undefined method JDocumentRaw::addCustomTag() in C:\xampp\htdocs\xxxxxx\plugins\content\phocagallery\phocagallery.php on line 1417


Any help ?

Thanks in advance

Re: Fatal error when using RT Rocksprocket

Posted: 06 Mar 2013, 19:39
by Jan
Hi, which version of Phoca Gallery Plugin you are using? Are you able to somehow make exception for displaying plugin in RAW documents in the module you are using?

Re: Fatal error when using RT Rocksprocket

Posted: 06 Mar 2013, 22:30
by Aladdin
Hi Jan.

Using Ver. 3.2.0

I use plgn i almost all articles. Ther is some explanation from Rocket Theme

The Phoca plugin tries to use a class method that doesn't exist.
The document type used by roksprocket to generate the code displayed in the module is not 'HTML' but 'RAW'. This involves some layout features are not available.
The Phoca plugin should check which type is the current document. If it's a 'HTML' document, it can call the methods and adds its stuff. If not, it should do nothing.

Re: Fatal error when using RT Rocksprocket

Posted: 07 Mar 2013, 02:24
by Jan
Hi, thank you for the info, I have added it to the feature request list (I hope nobody uses the plugin in RAW documents, I can image it as plugins can be used in PDF documents too)

I will add it to next release.

Jan

Re: Fatal error when using RT Rocksprocket

Posted: 07 Mar 2013, 14:31
by Aladdin
Hi
Use Phoca Gallery plugin in articles for past five years.

I must admit that the first time I ever heard the term raw document !? Where the error is.

How to actually use PG PLGIN in articles ??

Re: Fatal error when using RT Rocksprocket

Posted: 15 Mar 2013, 14:12
by Jan
Hi, I don't have any experiences with it. Phoca Gallery is standard Joomla! content plugin with standard Joomla! coding (normally working in content)

I don't see any protection against raw format in standard plugins, but try to modify the plugin for your needs:

Open:
plugins/content/phocagallery/phocagallery.php

after this line:

Code: Select all

public function onContentPrepare($context, &$article, &$params, $page = 0) {
try to add:

Code: Select all

$format = JRequest::getWord('format');
		if ($format=='raw') {
			return true;
		}
(for possible Joomla! 3 coding)

Code: Select all

$app 	= JFactory::getApplication();
$format = $app->input->get('format', '', 'string');
if ($format == 'raw') { return true;}
What the changes mean:
After the content plugin will be called, it will try to recognize the format in which the plugin is called, if it finds, it is "raw" document, then the plugin will do nothing and return empty value (nothing will be done, means in RAW documents the plugin will not run its output)

Jan

Re: Fatal error when using RT Rocksprocket

Posted: 23 Mar 2013, 19:16
by Aladdin
Hi Jan

Sorry I'm late with the response. Yes it is OK

Thanks

Re: Fatal error when using RT Rocksprocket

Posted: 30 Mar 2013, 13:23
by Jan
Ok