Bug #86734
closednot possible to edit pages with sys_language_uid > 9 with SiteHandling
100%
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);
Updated by Sven Juergens about 6 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Susanne Moog about 6 years ago
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review about 6 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
Updated by Anonymous about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 87fae8bcdfb5b9fa6f163501d139508e3320cef8.
Updated by Susanne Moog about 6 years ago
- Has duplicate Bug #86554: Field value does not get converted to array if using overrideVals added
Updated by Gerrit Code Review about 6 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
Updated by Gerrit Code Review about 6 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
Updated by Gerrit Code Review about 6 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
Updated by Daniel Goerz about 6 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.
Updated by Anja Leichsenring about 6 years ago
- Related to Bug #86754: OverrideVals are not always set for editing pages added
Updated by Gerrit Code Review about 6 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
Updated by Gerrit Code Review about 6 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
Updated by Anonymous about 6 years ago
- Status changed from Under Review to Resolved
Applied in changeset c26facec7afb2f35421b27dc64a5167d05823d42.