Issue Bug Closed

#109977SingleFieldContainer crashes when user_settings field has no config array (inheritFromParent not processed by addUserSetting())

Nitin Parri 06/03/26, 07:09 updated 06/11/26, 14:36

Description

## Summary

`ExtensionManagementUtility::addUserSetting()` does not process the
`inheritFromParent` option. When a field is registered with only
`[‘inheritFromParent’ => true]` (e.g. `realName` and `email`), no `config`
array is stored in `user_settings[‘columns’]`. This causes PHP 8.4 warnings
in `SingleFieldContainer` that are converted to exceptions by TYPO3’s
ErrorHandler, making the Setup module completely unusable.

## Steps to reproduce

1. Install TYPO3 14.3.x with PHP 8.5
2. Navigate to the backend Setup module (/typo3/setup)
3. Exception is thrown immediately

## Expected result

Setup module renders correctly.

## Actual result
```
PHP Warning: Undefined array key “config” in SingleFieldContainer.php line 150
PHP Warning: Undefined array key “config” in SingleFieldContainer.php line 92
PHP Warning: Undefined array key “type” in SingleFieldContainer.php line 137
```

## Root cause

`addUserSetting()` in `ExtensionManagementUtility` stores the field
configuration as-is without resolving `inheritFromParent`:

```php
$GLOBALS[‘TCA’][‘be_users’][‘columns’][‘user_settings’][‘columns’][$fieldName] = $fieldConfiguration;
```

Fields `realName` and `email` are registered in
`EXT:backend/Configuration/TCA/Overrides/be_users.php` with only
`inheritFromParent => true` and no `config` array.

## Workaround

Add null-safe fallbacks in `SingleFieldContainer.php`:

- Line 92: `$parameterArray[‘fieldConf’][‘config’] ?? []`
- Line 137: `$parameterArray[‘fieldConf’][‘config’][‘type’] ?? ‘none’`
- Line 150: `$this->data[‘processedTca’][‘columns’][$fieldName][‘config’] ?? []`

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 5

  1. Nitin Parri changed subject [Bug] SingleFieldContainer crashes when user_settings field has no config array (inheritFromParent not processed by addUserSetting()) SingleFieldContainer crashes when user_settings field has no config array (inheritFromParent not processed by addUserSetting()) <span data-processor="relativetime" data-value="2026-06-03T07:10:33+00:00" > 06/03/26, 07:10 </span>

  2. Christian Kuhn commented <span data-processor="relativetime" data-value="2026-06-04T17:44:36+00:00" > 06/04/26, 17:44 </span>

    Thanks for the report. The analysis does not add up, though: addUserSetting() storing inheritFromParent as-is is by design. The option is resolved at runtime by UserSettingsSchema->resolveInheritFromParent(), merging the parent be_users TCA columns, which define a full config for realName and email. A clean install does not crash.

    The reported warnings can be reached when an extension still adds Setup module fields the legacy way via $GLOBALS[‘TYPO3_USER_SETTINGS’] or ExtensionManagementUtility::addFieldsToUserSettings(). Could you check whether one of your extensions does that, and whether the crash goes away when it is deactivated? The full stack trace would help as well.

  3. Nitin Parri commented <span data-processor="relativetime" data-value="2026-06-11T10:53:42+00:00" > 06/11/26, 10:53 </span>

    You were right, it was an extension which didn’t assign a renderType in the usersettings TCA

  4. Garvin Hicking commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-06-11T14:36:29+00:00" > 06/11/26, 14:36 </span>

    Closing the issue, if I understand the feedback alright. Otherwise please let me know.