Error PhocaPDF together with Multicategories

Phoca PDF - creating PDF documents in Joomla! CMS
Gemini
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 13 Oct 2011, 07:25

Error PhocaPDF together with Multicategories

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

Re: Error PhocaPDF together with Multicategories

Post 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
If you find Phoca extensions useful, please support the project
Gemini
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 13 Oct 2011, 07:25

Re: Error PhocaPDF together with Multicategories

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

Re: Error PhocaPDF together with Multicategories

Post by Jan »

Hi, then I think, if this is not standard content output, then new plugin directly for multicategories must be written :-(

Jan
If you find Phoca extensions useful, please support the project
Gemini
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 13 Oct 2011, 07:25

Re: Error PhocaPDF together with Multicategories

Post by Gemini »

Hi Jan,

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

Chris
Post Reply