Project

General

Profile

Actions

Bug #106362

open

Exception if uid in tca label_alt

Added by Alexander Grein 3 days ago. Updated 2 days ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2025-03-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #106296: Schema API in EditDocumentControllerResolved2025-03-04

Actions
Actions #1

Updated by Garvin Hicking 3 days ago

  • Category set to FormEngine aka TCEforms
  • Status changed from New to Accepted

Thank you, we'll investigate!

Actions #2

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?

Actions #3

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;

Actions #5

Updated by Alexander Grein 2 days ago

  • File Bildschirmfoto am 2025-03-13 um 18.13.12.png added
Actions #6

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
Actions #7

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
Actions #8

Updated by Alexander Grein 2 days ago

Actions #9

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.13.12.png)
Actions #10

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.16.23.png)
Actions #11

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.14.13.png)
Actions #12

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.16.16.png)
Actions #13

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.16.09.png)
Actions #14

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.59.png)
Actions #15

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.50.png)
Actions #16

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.44.png)
Actions #17

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.36.png)
Actions #18

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.28.png)
Actions #19

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.08.png)
Actions #20

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.16.png)
Actions #21

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.15.01.png)
Actions #22

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.14.52.png)
Actions #23

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.14.43.png)
Actions #24

Updated by Alexander Grein 2 days ago

  • File deleted (Bildschirmfoto am 2025-03-13 um 18.14.24.png)
Actions #25

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

Actions #26

Updated by Georg Ringer 2 days ago

  • Related to Task #106296: Schema API in EditDocumentController added
Actions #27

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

Actions

Also available in: Atom PDF