Important: The select item helper passes the field TSconfig
Description
Get
resolves the items of a TCA select outside FormEngine, by calling the field's
items handler with a parameter array it assembles itself. That
array is meant to look like the one FormEngine passes, and in one entry it did
not:
$parameters held the complete page TSconfig tree of the
current page.
FormEngine passes something narrower there: the content of the field's
items page TSconfig, with that key already stripped, and
null
when the field has none. The helper now passes the same.
# The part a handler receives in $parameters['TSconfig']
TCEFORM.tx_academicjobs_domain_model_job.type.itemsProcFunc {
mySetting = 1
}
Impact
A handler that reads a setting of its own from
$parameters
found nothing when it was called through this helper, and works now. No handler
of these extensions read that entry before, so nothing this package ships
changes behaviour.
A project handler that compensated for the old shape, by descending through
$parameters itself, has to be adjusted: it now
receives the subtree directly, or
null
. A handler that also serves the
backend form already expects that shape, because FormEngine always passed it.
// Before, only through this helper
$mySetting = $parameters['TSconfig']['TCEFORM.'][$table . '.'][$field . '.']['itemsProcFunc.']['mySetting'] ?? null;
// After, the same as in FormEngine
$mySetting = $parameters['TSconfig']['mySetting'] ?? null;
Affected Installations
Installations with an own
items handler that is reached through
this helper and reads page TSconfig. The helper is used by
fgtclb/academic-jobs
for the job form of its frontend plugin.