$model null in list php_events plugins

Status
Not open for further replies.
After the problem with $formModel null in form onBeforeProcess plugins was sorted out, I found that there was a similar problem with deleting records from a list. For this, I use onDeleteRows in the php_events plugin. After a bit of investigation, I changed plugins/fabrik_list/php_events/php_events.php line 279 to:

$ret = Php::Eval(['code' => $code, 'vars' => ['args'=>$args, 'model' => $model]]);

That fixed it. Is it the right thing to do?

Incidentally, I notice that the changelog entry for the $formModel problem includes:
Add variables to Php::Eval also in case of additional php-file
Although I am using an additional php-file, I use pre-fixed variable names throughout. I only use $formModel and $model themselves as parameters in function calls in the forms’ php plug-ins’ php code boxes and the lists’ php_events plug-ins’ onDeleteRows code boxes.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top