Fatal error when using RT Rocksprocket

Phoca Gallery plugins - plugins for Phoca Gallery extension
Aladdin
Phoca Member
Phoca Member
Posts: 13
Joined: 28 May 2010, 11:57

Fatal error when using RT Rocksprocket

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Fatal error when using RT Rocksprocket

Post 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?
If you find Phoca extensions useful, please support the project
Aladdin
Phoca Member
Phoca Member
Posts: 13
Joined: 28 May 2010, 11:57

Re: Fatal error when using RT Rocksprocket

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Fatal error when using RT Rocksprocket

Post 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
If you find Phoca extensions useful, please support the project
Aladdin
Phoca Member
Phoca Member
Posts: 13
Joined: 28 May 2010, 11:57

Re: Fatal error when using RT Rocksprocket

Post 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 ??
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Fatal error when using RT Rocksprocket

Post 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
If you find Phoca extensions useful, please support the project
Aladdin
Phoca Member
Phoca Member
Posts: 13
Joined: 28 May 2010, 11:57

Re: Fatal error when using RT Rocksprocket

Post by Aladdin »

Hi Jan

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

Thanks
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Fatal error when using RT Rocksprocket

Post by Jan »

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