Fabrik plugin stopped working?

Status
Not open for further replies.
Hi,

I am trying to edit one fabrik form that I had created a long ago. But somehow the editing feature is not working as of now and looks like the plugin is missing some styles? I am getting the following view.

upload_2018-12-25_16-36-20.png
Also when I am trying to edit any element, the following error is getting displayed.

upload_2018-12-25_16-37-5.png

My joomla version is - Joomla! 3.7.5 Stable [ Amani ] 14-August-2017 12:09 GMT and Fabrikar version is 3.8

Please provide me any pointers to fix the issue.

Thanks,
Nikhil
 
Something must have changed on your site.
Did you update/install/remove anything?
Did your host update eg. php version, mySQL version...?
 
I restored my website using a backup on a new machine. I don't know whether the fabrik feature was broken in the old setup as well as I didn't edit any fabrik form etc in a long time. But in the new setup it looks broken. Unfortunately I don't have the old setup now.
 
Did you open and resave your Fabrik connection with the new database parameters?
Is other Joomla working as expected?
(I can't imagine that a wrong Fabrik connection will crash the WYSIWIG editor of the form introduction, so there may be more issues with your copied site).
 
Thanks for the guiding me and providing me the pointers.
I am still a beginner as far as php language and joomla ecosystem is concerned.
When I tried to open and resave my Fabrik connection, I got the following error.
upload_2018-12-25_23-40-2.png
And when I open up the connection, I can see the following message as well.

upload_2018-12-25_23-40-45.png

I think I have changed the password of my 'joomla' user in this new setup, but I can't seem to set the new password in Fabric connection now.

- Nikhil
 
it's not your Joomla user password but user and password for the database access.

Gesendet von meinem SM-G930F mit Tapatalk
 
My database user is 'joomla' but i can't seem to save the new password now. It gives me the following error.

upload_2018-12-26_8-33-14.png

When I try to create a new Fabrik connection, even then I get the same exception.

-Nikhil
 
That means there's something badly messed up in your Fabrik install, as it can't find the file ...

./components/com_fabrik/models/connection.php

The error message you are getting is on this line of code:

https://github.com/Fabrik/fabrik/bl...ponents/com_fabrik/models/connection.php#L169

... where we load the front end connection model on the line before, then attempt to use that model. That previous line would only return false (hence triggering the "call to a member function 'setId' on boolean" error) if the file I referenced can't be found.

I would recommend doing either ...

1) a full github update of Fabrik (see wiki), to make sure you have a the files. The current code should be compatible with J! 3.7, although it's possible there may be some issues with things like PDF document handling.

... or ...

2) update J! to the latest, then update Fabrik (and all its plugins) through the J! updater.

-- hugh
 
Hi,

As per the suggestion, I tried to did a full github update of Fabrik. But it is still not working. Any idea why I might be getting the following error in the java script?

upload_2018-12-30_16-6-27.png

I really want to avoid the Joomla update for now as that will result in lot's of work.

I can see the following in everything.php log.

2018-12-30T10:54:00+00:00 WARNING 141.101.88.182 jerror **Model class FabrikFEModelConnection not found in file.**
2018-12-30T10:54:00+00:00 CRITICAL 141.101.88.182 error Uncaught Throwable of type Error thrown. Stack trace: #0 /var/www/html/libraries/fabrik/fabrik/Helpers/StringHelper.php(117): Fabrik\Helpers\Worker::getDbo()
#1 /var/www/html/administrator/components/com_fabrik/models/fields/swaplist.php(133): Fabrik\Helpers\StringHelper::safeColName('text')
#2 /var/www/html/administrator/components/com_fabrik/models/fields/swaplist.php(56): JFormFieldSwapList->getGroupList()
#3 /var/www/html/administrator/components/com_fabrik/classes/37/field.php(414): JFormFieldSwapList->getInput()
#4 /var/www/html/libraries/joomla/form/fields/list.php(248): JFormField->__get('input')
#5 /var/www/html/administrator/components/com_fabrik/views/form/tmpl/bootstrap_control_group.php(23): JFormFieldList->__get('input')
#6 /var/www/html/libraries/legacy/view/legacy.php(694): include('/var/www/html/a...')
#7 /var/www/html/administrator/components/com_fabrik/views/form/tmpl/bootstrap_groups.php(19): JViewLegacy->loadTemplate(NULL)
#8 /var/www/html/libraries/legacy/view/legacy.php(694): include('/var/www/html/a...')
#9 /var/www/html/administrator/components/com_fabrik/views/form/tmpl/bootstrap.php(108): JViewLegacy->loadTemplate(NULL)
#10 /var/www/html/libraries/legacy/view/legacy.php(694): include('/var/www/html/a...')
#11 /var/www/html/libraries/legacy/view/legacy.php(229): JViewLegacy->loadTemplate(NULL)
#12 /var/www/html/administrator/components/com_fabrik/views/form/view.html.php(94): JViewLegacy->display(NULL)
#13 /var/www/html/libraries/legacy/controller/legacy.php(671): FabrikAdminViewForm->display()
#14 /var/www/html/administrator/components/com_fabrik/controller.php(39): JControllerLegacy->display()
#15 /var/www/html/libraries/legacy/controller/legacy.php(709): FabrikAdminController->display()
#16 /var/www/html/administrator/components/com_fabrik/fabrik.php(87): JControllerLegacy->execute('home.display')
#17 /var/www/html/libraries/cms/component/helper.php(389): require_once('/var/www/html/a...')
#18 /var/www/html/libraries/cms/component/helper.php(364): JComponentHelper::executeComponent('/var/www/html/a...')
#19 /var/www/html/libraries/cms/application/administrator.php(98): JComponentHelper::renderComponent('com_fabrik')
#20 /var/www/html/libraries/cms/application/administrator.php(156): JApplicationAdministrator->dispatch()
#21 /var/www/html/libraries/cms/application/cms.php(265): JApplicationAdministrator->doExecute()
#22 /var/www/html/administrator/index.php(51): JApplicationCms->execute()
#23 {main}


- Nikhil
 
Last edited:
OK, it looks like you are still missing files:

Code:
2018-12-30T10:54:00+00:00 WARNING 141.101.88.182 jerror **Model class FabrikFEModelConnection not found in file.**
2018-12-30T10:54:00+00:00 CRITICAL 141.101.88.182 error Uncaught Throwable of type Error thrown. Stack trace: #0 /var/www/html/libraries/fabrik/fabrik/Helpers/StringHelper.php(117): Fabrik\Helpers\Worker::getDbo()

Which means it still can't find ./components/com_fabrik/models/connection.php

Can you look on your server and confirm that file exists?

-- hugh
 
Hi,

First of all thank you for not giving up on this issue. A big thanks really !!

Looks like I do have the file.

upload_2018-12-31_11-40-24.png

Also attaching the screenshot of Javascript error in case if that helps.

upload_2018-12-31_11-41-13.png

Let me know, I can provide my information.

- Nikhil
 

Attachments

  • upload_2018-12-31_11-38-23.png
    upload_2018-12-31_11-38-23.png
    69.8 KB · Views: 280
I think I have more information and that might be useful in debugging the issue.

I added few log messages in getInstance() method of ./libraries/legacy/model/legacy.php file. And now I can see the following in the log file.

Code:
2018-12-31T11:39:17+00:00       DEBUG 108.162.229.110   my-debug-category       type - Connection
2018-12-31T11:39:17+00:00       DEBUG 108.162.229.110   my-debug-category       prefix - FabrikFEModel
2018-12-31T11:39:17+00:00       DEBUG 108.162.229.110   my-debug-category       modelClass - FabrikFEModelConnection
2018-12-31T11:39:17+00:00       DEBUG 108.162.229.110   my-debug-category       path - /var/www/html/administrator/components/com_fabrik/models/connection.php

As can be seen that the path it is referring to is var/www/html/administrator/components/com_fabrik/models/connection.php which is not the correct path, I guess? I do not see the FabrikFEModelConnection class in this file. I think instead the path should be
/var/www/html/components/com_fabrik/models/connection.php as suggested by you in the earlier post.

But I am not sure how this path is getting constructed, I have almost none php exposure and don't know many details. Could you please provide me few more pointers?

- Nikhil
 
Oh, and also make sure the Fabrik system plugin is enabled. Although if it wasn't, I don't think you'd get as far as the StringHelper class anyway.

-- hugh
 
Hi,

I don't see user_defines.php file under ./plugins/system/fabrik directory.

upload_2019-1-1_10-6-24.png

Also as you indicated the Fabrik system plugin is also enabled.

upload_2019-1-1_10-7-41.png

Just as a workaround as of now I have modifeed getInstance() method of ./libraries/legacy/model/legacy.php file.

Original Code
PHP:
                       if (!class_exists($modelClass))
                        {
                                                JLog::add(JText::sprintf('JLIB_APPLICATION_ERROR_MODELCLASS_NOT_FOUND', $modelClass), JLog::WARNING, 'jerror');
                                        return false;
                        }

Modified Code
PHP:
                       if (!class_exists($modelClass))
                        {
                                $path = str_replace('/administrator','',$path);
                                require_once $path;
                                if (!class_exists($modelClass))
                                {
                                        JLog::add(JText::sprintf('JLIB_APPLICATION_ERROR_MODELCLASS_NOT_FOUND', $modelClass), JLog::WARNING, 'jerror');
                                        return false;
                                }
                        }

These changes has helped me to recover from the issues and I can use almost every functionality of Fabrik, except when I click on any form element in the Fabrik administrator UI.
 
Last edited:
Hi,

After adding the following line in ./plugins/system/fabrik/defines.php, I could see the text echoed on the page.

PHP:
echo 'added path!';

When the model class is 'FabrikFEModelConnection', the call stack looks like the below. Does this look good to you or do you see any calls missing/misplaced?

upload_2019-1-2_18-29-12.png

upload_2019-1-2_18-27-3.png
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top