Issue Bug Closed

#86734not possible to edit pages with sys_language_uid > 9 with SiteHandling

Sven Juergens 10/24/18, 16:10 updated 05/07/19, 12:15

Description

hi,

I have a system with 10 languages ​​and several RootPages. Each RootPage has the default language and a translation.
The languages ​​are assigned via sitehandling.
If I assign a Rootpage the language 10 I can not edit these over the module “Pages” and get the following error message

(1/1) #1522960188 InvalidArgumentException
Language 1 does not exist on site xx.

I would like to edit the language with the UID 10, but get the error message the language with the Uid 1 is not available.
The Error is in \TYPO3\CMS\Backend\Form\Element\InputSlugElement::class (InputSlugElement.php) on line 67:

66 - $languageField = $GLOBALS['TCA'][$table]['ctrl']['languageField'];
67 - $languageId = (int)($row[$languageField][0] ?? 0);
68 - $baseUrl = $this->getPrefix($this->data['site'], $languageId);

$languageField is for table pages ‘sys_language_uid’ and $row has

$row[
  ...
   'sys_language_uid' = 10
 ...
]; 

so with line 67 we get only the ‘1’ instead of ‘10’

so line 67 sould changed to:

67 - $languageId = (int)($row[$languageField] ?? 0);

Reviews 2