Fresh install issues?

pd2fab

New Member
Downloaded Fabrik 3.8 just now on 2017-10-25

Clean install Joomla today, no other components installed, runs ok

Install Fabrik 3.8 and I get the following error messages after installation.

Warning: Class 'Fabrik\Helpers\Worker' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 14
Warning: Class 'Fabrik\Helpers\Pdf' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 15
Warning: Class 'Fabrik\Helpers\ArrayHelper' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 16
Warning: Class 'Fabrik\Helpers\StringHelper' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 17
Warning: Class 'Fabrik\Helpers\Text' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 18
Warning: Class 'Fabrik\Helpers\Element' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 19
Warning: Class 'Fabrik\Helpers\Html' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 20
Warning: Class 'Fabrik\Helpers\Image' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 22
Warning: Class 'Fabrik\Helpers\Googlemap' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 24

Any attempt to access the Module repeats these error messages plus:
An error has occurred.
0 Class 'FabrikWorker' not found
Return to Control Panel

Looked at various threads with similar messages but they do not seem to exactly relate to my situation.

Installation is:
OS Windows 7
Xampp 3.2.2
MySQLi 5.5.5-10.1.29-MariaDB
PHP Version 7.2.0
Web Server Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.0
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 3.8.0 Stable [ Amani ] 19-September-2017 14:00 GMT

Any suggestions welcome. Have repeated the complete installation including downloads 3 x now!
 
Looks like it's not copying the library folder during install for some reason.

Check that there is a ./libraries/fabrik folder, and that in that folder there is a /include.php file, and /fabrik folder with /Controllers and /Helpers folders in it. So there should be (for example) ./libraries/fabrik/fabrik/Helpers/Worker.php.

If that structure doesn't exist, look in ./components/com_fabrik/, and there should be a /fabrik folder, which is what the install script copies over to ./libraries. So you can manually copy that (or download and upload, depending what you are using to do your transfers) over to ./libraries.

Or ... do a full github update (see wiki).

Anyway ... let me know if that libraries folder exists or not ...

-- hugh
 
Yes I have...
...\libraries\fabrik\fabrik containing controllers and helpers.
Controllers directory contains controllers.php and helpers directory contains worker.php

I will have a crack at the github update. Thanks for the feedback :)
 
OK tried Github and assuming that I did everything correctly I am seeing nothing different. I will however redo everything from start just in case.
 
Strange, if you can see the folders and if GitHub didn't help.
Can you change your php version to see if this is the reason?
 
Second time round, no change, still see the error messages. May be the next update will work. When is the next one planned?
Edit: Only just saw the last message. Will try that too.
 
Also check \components\com_fabrik\helpers\legacy\aliases.php that it has the aliases named in the error messages.
 
Contents of \components\com_fabrik\helpers\legacy\aliases.php

?php
/**
* Legacy Fabrik 3.5 Fabrik\Helpers\Html FabrikHelperHTML
*
* @package Joomla
* @subpackage Fabrik.helpers
* @copyright Copyright (C) 2005-2016 fabrikar.com - All rights reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

class_alias('Fabrik\Helpers\Worker', 'FabrikWorker');
class_alias('Fabrik\Helpers\Pdf', 'FabrikPDFHelper');
class_alias('Fabrik\Helpers\ArrayHelper', 'FArrayHelper');
class_alias('Fabrik\Helpers\StringHelper', 'FabrikString');
class_alias('Fabrik\Helpers\Text', 'FText');
class_alias('Fabrik\Helpers\Element', 'FabrikHelperElement');
class_alias('Fabrik\Helpers\Html', 'FabrikHelperHTML');
//class_alias('Fabrik\Helpers\LayoutFile', 'FabrikLayoutFile');
class_alias('Fabrik\Helpers\Image', 'FabimageHelper');
//class_alias('Fabrik\Helpers\Pagination', 'FPagination');
class_alias('Fabrik\Helpers\Googlemap', 'FabGoogleMapHelper');

Message line numbers above don't match up with the error reporting?
Warning: Class 'Fabrik\Helpers\Worker' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 14
Warning: Class 'Fabrik\Helpers\Pdf' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 15
Warning: Class 'Fabrik\Helpers\ArrayHelper' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 16
Warning: Class 'Fabrik\Helpers\StringHelper' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 17
Warning: Class 'Fabrik\Helpers\Text' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 18
Warning: Class 'Fabrik\Helpers\Element' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 19
Warning: Class 'Fabrik\Helpers\Html' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 20
Warning: Class 'Fabrik\Helpers\Image' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 22
Warning: Class 'Fabrik\Helpers\Googlemap' not found in ...\components\com_fabrik\helpers\legacy\aliases.php on line 24

Tried to install a second version of Xampp but had problems getting it to run.

Now have to go and help some refugees for the rest of the day. Might be back tomorrow to have another go!
 
I have installed J383/F38 since 2017-10-25 and not had this problem. So I can only assume that it is an issue with your environment. But no idea what that might be.
 
I just installed xampp php7.2.
I don't have any issue after installing Joomla3.8.3 and Fabrik3.8, I can create a list, add element, add a record...

Only a warning:
Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp72\htdocs\installtest\administrator\components\com_fabrik\fabrik.php on line 81
 
[SOLVED*] (Or at least got it to work again) - Without upgrading XAMPP... still running PHP 5.5.15 (...I know!)

Steps to duplicate the error:
1. Rename your site folder to start with a number (and update the site config to the same)
2. Refresh your page... BAM!... weird..

Steps to get it working again (still keeping the number in the site's folder name):
1. Open [site path]/plugins/system/fabrik/defines.php
2. On line 58:

Uncomment:
//if (JFile::exists(COM_FABRIK_FRONTEND . '/helpers/legacy/aliases.php'))
//...
//else
//{
... keep this part
//}

Done!

Note: Since that block of code seems to be redundant by now, I didn't see the need to dig deeper than that.
 
Last edited:
Well, the "keep this part" is the redundant bit, only there as a transition for people running older versions of J! and Fabrik, while updating to newer versions.

And man, that's bizarre. I have no idea why a site folder starting with a number would kill the autoloading. Can't see any reason for it in the code.

If I get anyone else reporting this issue, I'll do some investigation, but for now I'm going to put it down as "one of those bizarre one-off things I'm not going to worry about for now".

-- hugh
 
[SOLVED]
Well, the "keep this part" is the redundant bit
In that event, ignore my previous post...

The problem: is with preg_replace in [site path]/libraries/fabrik/includes.php line 256, it removes any and all '\' with a number behind it.

For example: if any folder name anywhere in the path starts with a number, like 'My\2File\3Path', it gets turned into 'MyFilePath'... which is an invalid path and results in no class files loaded, which is the cause of OP's errors above (and causes Fabrik itself to crash completely).

Solution: Remove everything from line 253 - 257
PHP:
        //$class = str_replace('\\', '/', $class);
        //$file  = explode('/', $class);
        //$file  = strtolower(array_pop($file));
        //$path = preg_replace('#Fabrik\/Helpers\/#', JPATH_SITE . '/libraries/fabrik/fabrik/Helpers/', $class);
        //$path  = $path . '.php';
Replace with:
PHP:
        $class = str_replace('Fabrik\\Helpers\\', '', $class);
        $path  = JPATH_SITE . '/libraries/fabrik/fabrik/Helpers/' . $class . '.php';
Done.
 
Last edited:
Ah, OK, yup. The combination of Windows style directory separators and the numeric prefix causes the problem.

I'll run with that fix for a day or so then commit it.

Thanks,

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

Thank you.

Members online

Back
Top