Issue Bug Closed

#91382Ajax Widgets with QueryResult Object as Argument throw an Error since 9.5.17

Jonas Götze 05/13/20, 15:22 updated 05/19/20, 15:46

Description

When using a fluid ajax widget (custom or from core, e.g. autocomplete widget) which stores its configuration in the session you get an Exception:
>#1588178538 TYPO3\CMS\Fluid\Core\Widget\Exception
>
>Widget configuration items either must be null, scalar, array or JSON serializable, got “TYPO3\CMS\Extbase\Persistence\Generic\QueryResult”

<input type="text" id="myautocomplete" name="myautocomplete" />
<f:widget.autocomplete objects="{news}" for="myautocomplete" searchProperty="title" />

This is because the security related change here https://github.com/TYPO3/TYPO3.CMS/commit/e4fb92a85bed8067d45d2c25c4b559642f206248 which does not accept such an object as it is not JsonSerializable.
Though I am unsure about where and how this should be fixed.

Reviews 2