Issue Bug Closed

#86864SuggestWizard within FlexForms does not work

Stefan Froemken 11/06/18, 12:06 updated 05/07/19, 12:15

Description

Hello Core-Team,

I have a TCA group field in my Plugin-FlexForm with activated suggest feature. But when I try to find a record, autosuggest keeps empty.

Browser console return Error 500:
#1478345642 RuntimeException
Identifier could not be decoded to an array.

You have converted many backend JavaScript into a compressed version. And here is the problem.

In TYPO3 8.7 FormEngineSuggest.js:

dataStructureIdentifier = $searchField.data('datastructureidentifier'),

In TYPO3 9.5.1 FormEngineSuggest.js:

dataStructureIdentifier = e.dataset.datastructureidentifier

It looks like the same, but in TYPO3 8.7 the jquery data() function will convert string into JSON, if it looks like JSON:

if ( rbrace.test( data ) ) {
    return JSON.parse( data );
}

This conversion will not happen, if you try to access data attributes with dataset directly.

Stefan

Reviews 1