Issue Bug Closed

#106362Exception if uid in tca label_alt

Alexander Grein 03/12/25, 11:53 updated 12/02/25, 14:22

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.

Reviews 2

Files 3

History 2932

Show 7 earlier messages
  1. Garvin Hicking commented and changed category status New Accepted <span data-processor="relativetime" data-value="2025-03-12T17:08:12+00:00" > 03/12/25, 17:08 </span>

    Thank you, we’ll investigate!

  2. Georg Ringer commented and changed status Accepted Needs Feedback <span data-processor="relativetime" data-value="2025-03-12T21:12:20+00:00" > 03/12/25, 21:12 </span>

    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?

  3. Alexander Grein commented <span data-processor="relativetime" data-value="2025-03-13T16:59:00+00:00" > 03/13/25, 16:59 </span>

    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;
  4. Alexander Grein changed attached Bildschirmfoto am 2025-03-13 um 18.04.34.png <span data-processor="relativetime" data-value="2025-03-13T17:05:18+00:00" > 03/13/25, 17:05 </span>

  5. Alexander Grein changed attached Bildschirmfoto am 2025-03-13 um 18.13.12.png <span data-processor="relativetime" data-value="2025-03-13T17:13:47+00:00" > 03/13/25, 17:13 </span>

  6. Alexander Grein changed attached Bildschirmfoto am 2025-03-13 um 18.14.13.png attached Bildschirmfoto am 2025-03-13 um 18.16.23.png attached Bildschirmfoto am 2025-03-13 um 18.16.16.png attached Bildschirmfoto am 2025-03-13 um 18.16.09.png attached Bildschirmfoto am 2025-03-13 um 18.15.59.png attached Bildschirmfoto am 2025-03-13 um 18.15.50.png attached Bildschirmfoto am 2025-03-13 um 18.15.44.png attached Bildschirmfoto am 2025-03-13 um 18.15.36.png attached Bildschirmfoto am 2025-03-13 um 18.15.28.png attached Bildschirmfoto am 2025-03-13 um 18.15.16.png <span data-processor="relativetime" data-value="2025-03-13T17:16:52+00:00" > 03/13/25, 17:16 </span>

  7. Alexander Grein changed attached Bildschirmfoto am 2025-03-13 um 18.15.08.png attached Bildschirmfoto am 2025-03-13 um 18.15.01.png attached Bildschirmfoto am 2025-03-13 um 18.14.52.png attached Bildschirmfoto am 2025-03-13 um 18.14.43.png attached Bildschirmfoto am 2025-03-13 um 18.14.24.png <span data-processor="relativetime" data-value="2025-03-13T17:19:06+00:00" > 03/13/25, 17:19 </span>

  1. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.13.12.png <span data-processor="relativetime" data-value="2025-03-13T17:28:10+00:00" > 03/13/25, 17:28 </span>

  2. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.16.23.png <span data-processor="relativetime" data-value="2025-03-13T17:28:14+00:00" > 03/13/25, 17:28 </span>

  3. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.14.13.png <span data-processor="relativetime" data-value="2025-03-13T17:28:17+00:00" > 03/13/25, 17:28 </span>

  4. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.16.16.png <span data-processor="relativetime" data-value="2025-03-13T17:28:20+00:00" > 03/13/25, 17:28 </span>

  5. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.16.09.png <span data-processor="relativetime" data-value="2025-03-13T17:28:23+00:00" > 03/13/25, 17:28 </span>

  6. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.59.png <span data-processor="relativetime" data-value="2025-03-13T17:28:27+00:00" > 03/13/25, 17:28 </span>

  7. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.50.png <span data-processor="relativetime" data-value="2025-03-13T17:28:29+00:00" > 03/13/25, 17:28 </span>

  8. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.44.png <span data-processor="relativetime" data-value="2025-03-13T17:28:33+00:00" > 03/13/25, 17:28 </span>

  9. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.36.png <span data-processor="relativetime" data-value="2025-03-13T17:28:35+00:00" > 03/13/25, 17:28 </span>

  10. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.28.png <span data-processor="relativetime" data-value="2025-03-13T17:28:38+00:00" > 03/13/25, 17:28 </span>

  11. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.08.png <span data-processor="relativetime" data-value="2025-03-13T17:28:41+00:00" > 03/13/25, 17:28 </span>

  12. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.16.png <span data-processor="relativetime" data-value="2025-03-13T17:28:44+00:00" > 03/13/25, 17:28 </span>

  13. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.15.01.png <span data-processor="relativetime" data-value="2025-03-13T17:28:47+00:00" > 03/13/25, 17:28 </span>

  14. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.14.52.png <span data-processor="relativetime" data-value="2025-03-13T17:28:50+00:00" > 03/13/25, 17:28 </span>

  15. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.14.43.png <span data-processor="relativetime" data-value="2025-03-13T17:28:53+00:00" > 03/13/25, 17:28 </span>

  16. Alexander Grein changed Bildschirmfoto am 2025-03-13 um 18.14.24.png <span data-processor="relativetime" data-value="2025-03-13T17:28:56+00:00" > 03/13/25, 17:28 </span>

  17. Georg Ringer commented and changed status Needs Feedback Accepted <span data-processor="relativetime" data-value="2025-03-13T19:18:57+00:00" > 03/13/25, 19:18 </span>

    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

  18. Georg Ringer commented and changed attached Bildschirmfoto 2025-03-13 um 20.24.16.png <span data-processor="relativetime" data-value="2025-03-13T19:26:05+00:00" > 03/13/25, 19:26 </span>

    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);
        }
  19. Gerrit Code Review pushed patch set 1 for main to change 88614 status Accepted Under Review <span data-processor="relativetime" data-value="2025-03-17T13:16:34+00:00" > 03/17/25, 13:16 </span>

  20. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-03-17T14:30:09+00:00" > 03/17/25, 14:30 </span>

    Applied in changeset commit:09a894650260d28672e60501fd3929d4c6ddbe41.