Issue Bug Closed

#99996PHP Warning: Undefined array key "uid" in typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 1269

Thomas Hohn 02/20/23, 14:39 updated 03/14/23, 11:47

Description

We have a custom configuration where we have disabled the speakings url’s since we reference all our pages
via ?id=XXXCX.

We have seems this issue when we create a page A (id 10) and created a translation of it (id 11).
Now hide id 10 and go into the list module and find the translated page id 11 – press edit and
preview it. The warning will be thrown since the call to <

$this->page = $this->sys_page->getPage($this->page[$GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField']]);

will return the empty array since id 10 is hidden.
Instead a null coalescing operator should be added here:

$this->id = $this->page['uid'] ?? null;

It will the be handled properly in the method getPageAndRootline once https://forge.typo3.org/issues/99648 has been merged.

Reviews 2

History 38

  1. Thomas Hohn commented 02/20/23, 14:48

    Seems only to be an issue in TYPO3 11.x

  2. Gerrit Code Review pushed patch set 1 for 11.5 to change 77904 status New Under Review 02/20/23, 14:56

  3. Gerrit Code Review pushed patch set 2 for 11.5 to change 77904 02/20/23, 14:57

  4. Gerrit Code Review pushed patch set 3 for 11.5 to change 77904 02/24/23, 22:39

  5. Gerrit Code Review pushed patch set 1 for main to change 77951 02/27/23, 11:39

  6. Gerrit Code Review pushed patch set 4 for 11.5 to change 77904 02/27/23, 11:55

  7. Thomas Hohn commented and changed status Under Review Resolved done 0 % 100 % 02/27/23, 19:35

    Applied in changeset commit:accf2b2a0b9fe92c9a07e491c9b0d4321eebc62d.

  8. Benni Mack changed status Resolved Closed 03/14/23, 11:47