Page 1 of 1

Error PhocaPDF together with Multicategories

Posted: 13 Oct 2011, 08:55
by Gemini
Hi,

I'm using the component multicategories to assign one article to several categories. Unfortunately it seems that PhocaPDF (V1.0.9) don't work together with multicategories.

When I want to generate a PDF I got the following error:

Code: Select all

Fatal error: Call to a member function trigger() on a non-object in <...path...>\htdocs\joomla\administrator\components\com_phocapdf\helpers\phocapdfrender.php on line 136

# Time Memory Function Location 
1 0.0036 87512 {main}( ) ..\index.php:0 
2 0.6344 8722848 JSite->render( ) ..\index.php:79 
3 0.6360 8723960 JDocumentPhocaPDF->render( ) ..\application.php:168 
4 0.6402 8843032 PhocaPDFRender->renderPDF( ) ..\phocapdf.php:51 
Has anyone some experience using PhocaPDF together with Multicategories or some suggestions to fix the problem?

Thanks
Chris

Re: Error PhocaPDF together with Multicategories

Posted: 17 Oct 2011, 22:30
by Jan
Hi, try to add this code:

Code: Select all

$dispatcher	= &JDispatcher::getInstance();
after:

Code: Select all

default:
and before:

Code: Select all

$results = $dispatcher->trigger('onBeforeDisplayPDF'.$t, array (&$pdf, &$content, &$document));
cca on line administrator\components\com_phocapdf\helpers\phocapdfrender.php on line 136

Jan

Re: Error PhocaPDF together with Multicategories

Posted: 18 Oct 2011, 08:02
by Gemini
Hi Jan,

thanks for your reply. I inserted the line you suggested. Now this causes another error:

Code: Select all

Fatal error: Call to a member function SetMargins() on a non-object in <...path...>\htdocs\joomla\administrator\components\com_phocapdf\helpers\phocapdfrender.php on line 144 
Call Stack 
# Time Memory Function Location 
1 0.0024 87584 {main}( ) ..\index.php:0 
2 0.7146 8727032 JSite->render( ) ..\index.php:79 
3 0.7164 8728144 JDocumentPhocaPDF->render( ) ..\application.php:168 
4 0.7204 8848000 PhocaPDFRender->renderPDF( ) ..\phocapdf.php:51


NOTE: Since I insert the line you suggested, the line numbers changed. Line 144 is now:

Code: Select all

$pdf->SetMargins($content->margin_left, $content->margin_top, $content->margin_right);
Chris

Re: Error PhocaPDF together with Multicategories

Posted: 19 Oct 2011, 22:50
by Jan
Hi, then I think, if this is not standard content output, then new plugin directly for multicategories must be written :-(

Jan

Re: Error PhocaPDF together with Multicategories

Posted: 20 Oct 2011, 07:41
by Gemini
Hi Jan,

thank for your reply. That's what I have feared... :(

Chris