Element Plugin - User - Hidden - does not save

nbradshaw

Active Member
When Element Plugin - User -> Hidden using ID - the form does not save. This does work when showing on form on save.

Error: Incorrect integer value: '' for column 'created_by' at row 1
 
Last edited:
This is how to reproduce:
There is no issue on NEW record/row.

This issue is when user element db value = NULL on EDIT record.

Attaching some screenshots of the element settings - hopefully that is helpful.
 

Attachments

  • fabrik_user_error1.PNG
    fabrik_user_error1.PNG
    53.9 KB · Views: 55
  • fabrik_user_error2.PNG
    fabrik_user_error2.PNG
    42.9 KB · Views: 54
Last edited:
Can you try?
in \plugins\fabrik_element\user\user.php
change line 189
$layoutData->value = is_a($user, 'User') ? $user->get('id') : '';
to
$layoutData->value = is_a($user, 'User') ? $user->get('id') : 0;
 
ok, yes, it was already fixed (https://github.com/joomlahenk/fabrik/wiki/Changelog, I was testing with the updated code)

change line 188/189
$layoutData->readOnly = is_a($user, 'Joomla\CMS\User\User') ? $user->get($displayParam) : '';
$layoutData->value = is_a($user, 'Joomla\CMS\User\User') ? $user->get('id') : '';

and line 1008
return is_a($user, 'Joomla\CMS\User\User') ? $user->get($displayParam) : false;
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top