Bug #51871
closedEmpty userTSConfig settings overrule pageTSConfig
100%
Description
Following commit (https://review.typo3.org/#/c/23032/ - Ticket: http://forge.typo3.org/issues/51007) leads to defective behaivor in \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule().
If you access TYPO3\CMS\Backend\UtilityBackendUtility::getModTSconfig() with a tsconfig string which only exists in pageTSConfig and not in userTSConfig, pageTSConfig value will be overruled by undefined userTSConfig setting.
This is reasoned by the changed default return value in TYPO3\CMS\Core\Utility\GeneralUtility\BackendUserAuthentication->getTSConfig() for undefined TSConfig settings. If there is no userTSConfig defined for given setting it will return
array('value' => NULL, 'properties' => NULL);
Previously it returned an empty array.
Subsequently the function TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule() merges userTSconfig and pageTSconfig wrong because of given value/properties array for undefined tsconfig setting. Actual value of pageTSconfig will be overruled by NULL value of userTSconfig.
I am not sure how a proper fix would look like. Reverting the change of http://forge.typo3.org/issues/51007 and updating doctype comment? Call array_merge_recursive_overrule in getModTSconfig with includeEmptyValues = false?
Updated by Ernesto Baschny about 11 years ago
- Category set to Backend API
- Is Regression changed from No to Yes
Thanks for reporting Max. We'll take a look at it!
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23701
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23702
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23703
Updated by Helmut Hummel about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8bd8e69fa312ebcb8110233d9516cd50965657fd.