• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

[SOLVED] Image upload: "Class '\Fabrik\Helpers\Image\Imagegd2' not found" and PHP errors

lousyfool

Well-Known Member
Staff member
Hi again,

Since updates J! 3.8.x -> 3.9 and Fabrik 3.8.1 -> 3.9, image uploads with the 'fileupload' element don't work anymore but throw errors, in frontend, backend and PHP error log, and both in PHP 7.2 and 7.1.

Frontend/backend error:
Code:
Class '\Fabrik\Helpers\Image\Imagegd2' not found

PHP error log:
Code:
Undefined index: j_bc_content___img_main in /blablabla/plugins/fabrik_element/fileupload/fileupload.php on line 2254
Undefined variable: myFileDir in /blablabla/plugins/fabrik_element/fileupload/fileupload.php on line 2260

I'm not using AJAX upload but standard.
Needless to say, since updating no other relevant settings have been modified, and GD support is still enabled on the server.

Many thanks for another quick intervention!
 
I can confirm this issue.

It worked fine on the latest Fabrik 3.8.

But as soon as I upgraded to Fabrik 3.9 this problem occured.

Unfortunately this is critical, as I have too many sites to revert back to an older version.

Hugh, or someone who knows where the issue might be, is it possible you can have a look at this please?

Thanks,
 
Last edited:
Can you check if there's a file
your-site\libraries\fabrik\fabrik\Helpers\Image\Imagegd2.php

I can't replicate but I'm running a GitHub update.
 
Last edited:
Hi Troester, yes there is.

Size is 4370 bytes

However, looking deeper at the error message "0 Class '\Fabrik\Helpers\Image\Imagegd2' not found"

I see it is looking for Fabrik with capital F, yet on my install, the folder is lowercase

0:/public_html/libraries/fabrik/fabrik/Helpers/Image/

Could this be an issue?
 
Last edited:
The case of the class and file paths aren't related.

@p38 - can you find me on Skype, and get me logged on to your site.

-- hugh
 
Sorry, been away the last two days, but can now confirm that after applying the Github fix, image uploads are working fine again!
Brilliant - many thanks for the prompt and effective solution, also to @p38 for joining in!

I'm still getting the same two lines in the PHP error log, though:
Code:
PHP Notice:  Undefined index: j_bc_content___img_main in /blablabla/plugins/fabrik_element/fileupload/fileupload.php on line 2254
PHP Notice:  Undefined variable: myFileDir in /blablabla/plugins/fabrik_element/fileupload/fileupload.php on line 2260

Anything that could/should be done about it?

Thank you so much again!

(P.S.: No kidding... am thinking to take out a support subscription as another way of "rewarding" your good work, but it seems to be not possible now. I'll keep an eye open for it and do the useful then.)
 
... it means your upload element doesn't exist in the submitted data.

I've added some code to stop the warnings, but there's probably another underlying issue.

Many thanks, Hugh,

Indeed, no more notices in the log.
Not sure if it helps, but from testing before applying the fix I can say that the notices were thrown only when a new or different file was uploaded on form submission, but not when the form was submitted without a file (the element is not "required") or when the file remained the same in edit mode.

Anyway, I'll mark this "solved" for now. Thanks again!
 
Last edited:
I'm experiencing this with a new list I'm working on. It's worth noting that I recently used the fabrik library to patch some buggies. Currently on fabrik 3.9
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top