• Fabrik V4.4.1 is now available.

    This version corrects the Admin issue introduced by V4.4. V4.4.1 is available through the Joomla Updater or for download through your My Downloads area of our website.

    Turns out a code change intended for our 5.0dev branch inadvertantly got pushed to the 4.x branch (by me, duh!). The javascript structure in 5.0 will change considerably and part of that change took effect with the inadvertant code change.

    We have reverted the code change and released 4.4.1. V4.4 has been retracted.

    Sorry for any inconvenience.

  • A new version of Full Calendar is now available.

    See the details here

End of form submission (onAfterProcess) - only working if form editing

lawmaina78

New Member
Form plugin event "End of form submission (onAfterProcess)" not working for new form, only works when editing an existing form, even though I have set it to work on both.
 
It's working on my site on edit and on new.
When you say not working, is it just not running or does something bad happen?
Error messages? (enable a Joomla error reporting level).
Which exact Fabrik, Joomla, php version?
Anything in your code related to new/existing records (e.g. trying to use non-existing data on new)? Try to debug.
 
For the record the Form php plugin with code running at "end of Form Submission (onAfterProcess)" is working OK in my testing.
Further, the Form PHP code is also called when copying a list row (copy list row plugin), but, for me, I find one change in behavior over Fabrik3.10 when doing a row copy, as described below, in case it helps others.

When my onAfterProcess php script is called from a form add or edit, then for a dropdown element, the object returned from $formModel->getElementData("fullfieldname", true) is an array, as expected. But when the script is called from a list row copy, the same function call returns a straight object. (In 3.10 it also returned an array)
The obvious simple workaround I have added is to check for an array in the returned object in the php code;

$user = $formModel->getElementData("fullfieldname", true);
$userField = is_array($user) ? $user[0] : $user;​

(Fabrik 4.0beta4b, Joomla 4.2.6, PHP8.1)
 
It's working on my site on edit and on new.
Error messages? (enable a Joomla error reporting level).
Which exact Fabrik, Joomla, php version?
Anything in your code related to new/existing records (e.g. trying to use non-existing data on new)? Try to debug.

I've enabled debug mode and seen this error "Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home1/ugwebcorp/public_html/ecitizen/libraries/fabrik/fabrik/Helpers/Uploader.php on line 217"

I am using

PHP Version 8.1.14
Joomla 4.2.6
 
"Deprecated..." is only a notice.
When you say not working, is it just not running or does something bad happen?
Anything in your code related to new/existing records (e.g. trying to use non-existing data on new)? Try to debug.
Debug = put stuff like var_dump($some-variable);exit; into your code to see where it's (not) going, what you exactly get etc. ("Passing null..." sounds like an empty/not set variable)
 

Members online

No members online now.
Back
Top