Project

General

Profile

Actions

Bug #86734

closed

not possible to edit pages with sys_language_uid > 9 with SiteHandling

Added by Sven Juergens over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-10-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

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);


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #86754: OverrideVals are not always set for editing pages ClosedDaniel Goerz2018-10-26

Actions
Has duplicate TYPO3 Core - Bug #86554: Field value does not get converted to array if using overrideValsClosedAndreas Wolf2018-10-03

Actions
Actions #1

Updated by Sven Juergens over 5 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #2

Updated by Joerg Kummer over 5 years ago

Is this related to #86662?

Actions #3

Updated by Susanne Moog over 5 years ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58696

Actions #5

Updated by Anonymous over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Susanne Moog over 5 years ago

  • Has duplicate Bug #86554: Field value does not get converted to array if using overrideVals added
Actions #7

Updated by Gerrit Code Review over 5 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58700

Actions #8

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58700

Actions #9

Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58700

Actions #10

Updated by Daniel Goerz over 5 years ago

This bug pointed to a different issue that lies a bit deeper.

The value of the sys_language_uid field of the pages table is an array if properly processed by formEnging (see TcaSelectItems).

However, since the removal of pages_language_overlay the sys_language_uid is passed as overrideVals to the formEngine (GET parameter overrideVals[pages][sys_langauge_uid]). This was streamlines in the core with #86754.

In case overrideVals are set, the TcaSelectItems will NOT process the field sys_language_uid because the type is set to hidden during runtime. This results in the value arriving in the InputSlugElement will not be an array.

Since it is still possible for a custom edit functionality to not set the overrideVals, the InputSlugElement needs to be able to handle both cases.

How can you test this?

Edit a page with and without the overrideVals GET parameter and check that the InputSlugElement determines the ID correctly in both cases.

Actions #11

Updated by Anja Leichsenring over 5 years ago

  • Related to Bug #86754: OverrideVals are not always set for editing pages added
Actions #12

Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58700

Actions #13

Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58700

Actions #14

Updated by Anonymous over 5 years ago

  • Status changed from Under Review to Resolved
Actions #15

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF