J!5 Issue with field element containing JSON when used in a Join

ghicar

Member
I have two tables A & B, and the list view for table A (left) joins table B. The join allows a repeating group.

One of the elements in table B (a Field element) can contain a JSON string. When the Table B list is viewed or a row in this table edited or viewed all is fine. Also, when the list view of Table A is displayed with fields of table B visible all is also fine. However, when you try to edit or do a details view of a row of table A it can cause a PHP error:

Details View:
html_entity_decode(): Argument #1 ($string) must be of type string, array given
~/components/com_fabrik/models/element.php (2521)

Editing edit:
htmlspecialchars(): Argument #1 ($string) must be of type string, array given
~/plugins/fabrik_element/field/field.php (191)

It seems to be caused by having [] in the JSON, ie a simple string below will cause the issue.
Code:
{"foobar":[]}

My environment is:
Joomla 5.0.1
PHP 8.2.13
Fabrik: 4Zeta
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top