Bug #106362
openException if uid in tca label_alt
0%
Description
After updating from TYPO3 13.4.5 to TYPO3 13.4.7 I get this exception when I try to save a fe_users record with a modified tca:
TYPO3\CMS\Backend\Controller\EditDocumentController::{closure:TYPO3\CMS\Backend\Controller\EditDocumentController::processData():719}(): Argument #1 ($field) must be of type TYPO3\CMS\Core\Schema\Field\FieldTypeInterface, null given
It comes from a change coming with this commit:
https://github.com/typo3/typo3/commit/d6b5de2dfdc
After playing around a bit in my tca configuration i found the cause:
$GLOBALS['TCA']['fe_users']['ctrl']['label_alt'] = 'uid,usergroup';
After removing the uid field from the label_alt, the exception disappears.
Files
Updated by Garvin Hicking 3 days ago
- Category set to FormEngine aka TCEforms
- Status changed from New to Accepted
Thank you, we'll investigate!
Updated by Georg Ringer 3 days ago
- Status changed from Accepted to Needs Feedback
I can't confirm that, neither in 13 nor in 14. just put
$GLOBALS['TCA']['fe_users']['ctrl']['label_alt'] = 'uid,usergroup'; $GLOBALS['TCA']['fe_users']['ctrl']['label_alt_force'] = true;
no matter if label_alt_force is set or not.
can you test that again on some clean sites or do you have more code like label userfunc?
Updated by Alexander Grein 2 days ago
I can reproduce this issue in tree different project.
All of them running under TYPO3 13.4.7. Two of them under PHP 8.4.4, one under PHP 8.3.17.
The one running under PHP 8.3 is a very simple one, with just TYPO3 and EXT:bootstrap_package installed.
The fe_users TCA is not modified somewhere else. I only added one test usergroup and one test user.
Without modifying storing works without any issue.
After adding this few lines to the new created Configuration/TCA/Overrides/fe_users.php file inside my template-extension, I get the exception when pressing the save button after edit:
<?php
defined('TYPO3') or die('Access denied.');
$GLOBALS['TCA']['fe_users']['ctrl']['label_alt'] = 'uid,usergroup';
$GLOBALS['TCA']['fe_users']['ctrl']['label_alt_force'] = true;
Updated by Alexander Grein 2 days ago
Updated by Alexander Grein 2 days ago
- File Bildschirmfoto am 2025-03-13 um 18.13.12.png added
Updated by Alexander Grein 2 days ago
- File Bildschirmfoto am 2025-03-13 um 18.14.13.png added
- File Bildschirmfoto am 2025-03-13 um 18.16.23.png added
- File Bildschirmfoto am 2025-03-13 um 18.16.16.png added
- File Bildschirmfoto am 2025-03-13 um 18.16.09.png added
- File Bildschirmfoto am 2025-03-13 um 18.15.59.png added
- File Bildschirmfoto am 2025-03-13 um 18.15.50.png added
- File Bildschirmfoto am 2025-03-13 um 18.15.44.png added
- File Bildschirmfoto am 2025-03-13 um 18.15.36.png added
- File Bildschirmfoto am 2025-03-13 um 18.15.28.png added
- File Bildschirmfoto am 2025-03-13 um 18.15.16.png added
Updated by Alexander Grein 2 days ago
- File Bildschirmfoto am 2025-03-13 um 18.15.08.png added
- File Bildschirmfoto am 2025-03-13 um 18.15.01.png added
- File Bildschirmfoto am 2025-03-13 um 18.14.52.png added
- File Bildschirmfoto am 2025-03-13 um 18.14.43.png added
- File Bildschirmfoto am 2025-03-13 um 18.14.24.png added
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.13.12.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.16.23.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.14.13.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.16.16.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.16.09.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.59.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.50.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.44.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.36.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.28.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.08.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.16.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.15.01.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.14.52.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.14.43.png)
Updated by Alexander Grein 2 days ago
- File deleted (
Bildschirmfoto am 2025-03-13 um 18.14.24.png)
Updated by Georg Ringer 2 days ago
- Status changed from Needs Feedback to Accepted
can confirm. by using
$GLOBALS['TCA']['fe_users']['ctrl']['label_alt'] = 'uid,usergroup'; $GLOBALS['TCA']['fe_users']['ctrl']['label_alt_force'] = true;
and pressing save in the fe_user
Updated by Georg Ringer 2 days ago
- Related to Task #106296: Schema API in EditDocumentController added
Updated by Georg Ringer 2 days ago
can confirm. by using
$GLOBALS['TCA']['fe_users']['ctrl']['label_alt'] = 'uid,usergroup'; $GLOBALS['TCA']['fe_users']['ctrl']['label_alt_force'] = true;
and pressing save in the fe_user
problem however is something where else, debugging $labelCapability
shows that the additionalFields
got null for the uid field which is wrong.
I guess
public function getAdditionalFields(): array { return array_filter($this->additionalFields); }is also not the correct solution but would work