Bug #21185
closedSetting default values for $BE_USER->uc doesn't work for multi-dimensional arrays
0%
Description
You can set default values for $BE_USER->uc using
a) $TYPO3_CONF_VARS['BE']['defaultUC']
b) setup.default in UserTS
(merged in t3lib_beUserAuth: $this->uc = array_merge($this->uc_default, (array)$TYPO3_CONF_VARS['BE']['defaultUC'], (array)$this->getTSConfigProp('setup.default')))
Using TS has one major problem:
Imagine, you want to enable "Extended view" (a.k.a. bigControlPanel setting of web_list module) by default. So you set the following:
setup.default.moduleData.web_list.bigControlPanel = 1
In good old TS manner, this results in
array(moduleData. => array(web_list. => array(bigControlPanel => 1)))
instead of
array(moduleData => array(web_list => array(bigControlPanel => 1)))
which would be expected to merge into the other arrays (mind the dots!).
So before merging, the array $this->getTSConfigProp('setup.default') has to be cleaned up (remove all trailing dots).
(issue imported from #M12113)
Files