Cannot redeclare class FabrikPDFHelper

rdaniele

New Member
I updated both Joomla and Fabrikar to the last versions (Joomla 3.6.5 and fabrikar 3.8.1).
When i try to create a pdf file i get this error:
Code:
Fatal error: Cannot redeclare class FabrikPDFHelper in /...../components/com_fabrik/helpers/pdf.php on line 25
 
Try doing a full github update.

Out of interest, which did you update first, J! or Fabrik, and what version of J! did you update from?

-- hugh
 
You said "I updated both Joomla and Fabrikar to the last versions"
Last Joomla is 3.8.5
J!3.6.5 is outdated (and has security bugs)
 
You should really update J!, but assuming you have some overriding reason why you can't, and also I suspect it might not fix this issue ...

Fabrik should no longer be using components/com_fabrik/helpers/pdf.php, it should be using the new location, ./libraries/fabrik/fabrik/helpers/Pdf.php.

So I think what must be happening is you have a file somewhere which hasn't been updated for some reason, which is still trying to "require" the old file, after the new one has already been loaded (hence the "cannot redeclare class").

What I suggest is that you delete (or perhaps rename) components/com_fabrik/helpers/pdf.php, which should then trigger an error that tells us what line of what file is still trying to use it. And copy and paste that error here. Once we know what file it is, we can figure out what's going on.

-- hugh
 
i renamed pdf.php:
Code:
Warning: require_once(/.../components/com_fabrik/helpers/pdf.php): failed to open stream: No such file or directory in /.../libraries/joomla/document/pdf/pdf.php on line 19

Fatal error: require_once(): Failed opening required '/.../components/com_fabrik/helpers/pdf.php' (include_path='.:/usr/share/pear:/usr/share/php') in /.../libraries/joomla/document/pdf/pdf.php on line 19
 
OK, well that's weird. Yes, in 3.6.5 the old Joomla document library path is used (as of 3.7, document drivers are in a different location and use different code) so it'll try and use the old helper files. Which aren't shipped with Fabrik any more. But if you just updated, rather than installing Fabrik from scratch, they should still be there from your previous install.

My advice is update J! to the latest, then it'll work.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top