• 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.

Element Validations don't work with form javascript in F3.2?

chipperfield

New Member
Hi Guys,
I am upgrading an existing site to Joomla 3.3.3 (all OK) and Fabrik 3.2 (mostly OK except this)
I have standard 'notempty' and 'isemail' validations on some elements such as emailaddress.
I also have a form_1.js and user_ajax.php which go and get customer details from another db based on the email address element and place them on the form. This all worked fine in J2.5/F3.0.
With F3.2 I can trace the js and ajax php executing OK, and placing the customer details on the form. But then the validation kicks in and never ends. Just shows 'validating' message on any elements which have any validation plugin applied.
If I unpublish the element validations it all works fine, but then I'd have to put all the element validations into the js script.
The only error log I can see is Firebug gives the attached mootools error, but this doesn't help me much!
Does anyone have any suggestions?
Thanks,
Giles
 

Attachments

  • FirebugCapture.PNG
    FirebugCapture.PNG
    2.3 KB · Views: 270
Check in Firebug/Network tab /Response
I seems it is containing an error message instead of the expected JSON string.
 
Check in Firebug/Network tab /Response
I seems it is containing an error message instead of the expected JSON string.

Hi Troester. Thanks for quick reply, but JSON response from ajax call seems OK. Firebug does not show any errors from ajax and the response is correctly formatted as:
{"errors":"","warnings":"","MembershipNo":"2121","PersonId":"4686","EmailAddress":"etc etc
The only change I have made to the javascript file from Fabrik 3.0 is to add requirejs(['fab/fabrik'] to each functio. This was from Sophist's post on forum (http://fabrikar.com/forums/index.ph...t-referenceerror-fabrik-is-not-defined.37387/) to get round 'fabrik is undefined' error which occurred after the upgrade.
Maybe I have done this wrong ? I added the requirejs as below and ajax fucntions now work but clearly something else does not! More suggestions very welcome.
Thanks
Giles
function js_getMemberDetails(){ //existing function in form_1.js
requirejs(['fab/fabrik'], function () { // requirejs wrapper added to load fabrik.js first
.....ajax javascript stuff... // existing body of function in form_1.js
}); // end of requirejs wrapper
} // end of existing function in form_1.js
 
Hi Troester and others,
I have found the solution - and may be worth posting here since it could affect others.
Problem was that I had set ErrorReporting to Maximum in Global Config when debugging the Joomla upgrade process.
The Ajax calls from the form_1.js worked fine - but then the Fabrik Form submission Post for the form validations returned a warning in Firebug as below, which meant that the form submission hung and never completed.
So the solution for me was to turn Error Reporting off, but I guess components\com_fabrik\models\form.php line 1576
could do with looking at at some point when you great guys have time.
Thanks for pointing me in the right direction,
Giles
<br /> <b>Deprecated</b>: preg_replace(): The /e modifier is deprecated, use preg_replace_callback
instead in <b>C:\Apache24\htdocs\ltsc-online\components\com_fabrik\models\form.php</b>
on line <b>1576</b><br />
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top