Bug #79853
closedException when setting "Language" to "all" for new and/or existing content elements in backend
100%
Description
I have a very weird issue on TYPO3 8.6 and cannot find out where to start looking: It’s an almost empty installation with a main and a second language, whenever I try t o set a content element to “Language ALL” i get an exception in the backend.
If I set the sys_language_uid to -1 manually in the DB the content element is shown with the “all” settings and displayed correctly in the frontend, but I cannot add or edit another content element on the same page (always throws same error).
I setup a TYPO3 7.6 with exactly the same setup and it works as expected there. It does not depend on any language overlay TS settings.
(See attached animated gif) or https://dl.dropboxusercontent.com/u/81358/jing/language-all.gif
Argument 3 passed to TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::synchronizeFieldValues() must be of the type array, null given, called in /Applications/MAMP/htdocs/__typo3_source/typo3_src-8.6.0/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php on line 253 TypeError thrown in file /Applications/MAMP/htdocs/__typo3_source/typo3_src-8.6.0/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php in line 323.
PHP version used was 7.0.12.
(this is my first core bug that I file, please be considerate if I forgot something :)
Files
Updated by Christian Kuhn almost 8 years ago
- Priority changed from -- undefined -- to Must have
- Sprint Focus set to Stabilization Sprint
Updated by Georg Ringer almost 8 years ago
- Status changed from New to Accepted
- Is Regression changed from No to Yes
Updated by Timo Hund over 7 years ago
I had a look on the issue. The reason for the error is, that in the method synchronizeTranslationItem BackendUtility::getRecordWSOL is called with tt_content, and record uid 0 in this case and this record can't exist.
When i add a check in the method "synchronizeTranslationItem" and skip the sychronisation process then (what makes sence in my opinion) i don't get this error anymore:
protected function synchronizeTranslationItem(DataMapItem $item, array $fieldNames, int $fromId) { if ($fromId === 0) { return; } ...
Since i am not so deep in the translation handling i don't know if this could have any other side effects. Maybe somebody else can help and knows why this can happen?
Updated by Gerrit Code Review over 7 years ago
- Status changed from Accepted 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/51804
Updated by Gerrit Code Review over 7 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/51804
Updated by Gerrit Code Review over 7 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/51804
Updated by Gerrit Code Review over 7 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/51804
Updated by Gerrit Code Review over 7 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/51804
Updated by Gerrit Code Review over 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51804
Updated by Gerrit Code Review over 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51804
Updated by Timo Hund over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f52349adfe90f13fccbac3fec41edb3d82de40b4.
Updated by Gerrit Code Review over 7 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/51962
Updated by Oliver Hader over 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset 7d92cdc825fd82d0261e3b6f880b681b416644de.
Updated by Bert Hiddink over 7 years ago
When upgrading from 7.x to 8.7.2 and running the step "Execute database migrations on single rows" with the upgradeWizard from Install Tool, I get the following error:
Argument 3 passed to TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::synchronizeFieldValues() must be of the type array, null given, called in typo3_src-8.7.2/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php on line 316 TypeError thrown in file typo3_src-8.7.2/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php in line 384.
Seems very similar to this bug https://forge.typo3.org/issues/79853 but this seems already having been resolved in the 8.6-branch.
Any ideas where this error comes from?
Updated by christian rauch over 7 years ago
This happens with translated records whose parents are deleted (deleted=1)
for example:
tt_content:
uid=1, l18n_parent=0, sys_language_uid=0, deleted=1
uid=2, l18n_parent=1, sys_language_uid=1, deleted=0 ======> Error
I didn't dig any deeper as i tried to update from a typo3 4.5 Project to 8 LTS and there were only 2 records where this error happened
Updated by Jonas Enders about 7 years ago
To fix the problem mentioned by christian rauch, I wrote a sql statement:
CREATE TEMPORARY TABLE tmp SELECT child.uid FROM tt_content AS parent INNER JOIN tt_content AS child ON (child.l18n_parent = parent.uid) WHERE parent.deleted = 1 AND child.deleted = 0;
DELETE FROM tt_content WHERE uid IN (SELECT uid FROM tmp);
DROP TABLE tmp;
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed
Updated by Kurt Gusbeth about 7 years ago
Uncaught TYPO3 Exception
Argument 3 passed to TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::synchronizeFieldValues() must be of the type array, null given, called in /html/typo3/typo3_src-8.7.8/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php on line 320
TypeError thrown in file
/html/typo3/typo3_src-8.7.8/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php in line 384.
and
CREATE TEMPORARY TABLE tmp SELECT child.uid FROM tt_content AS parent INNER JOIN tt_content AS child ON (child.l18n_parent = parent.uid) WHERE parent.deleted = 1 AND child.deleted = 0;- MySQL lieferte ein leeres Resultat zurück (d.h. null Datensätze).
DELETE FROM tt_content WHERE uid IN (SELECT uid FROM tmp); - MySQL lieferte ein leeres Resultat zurück (d.h. null Datensätze).
DROP TABLE tmp; - MySQL lieferte ein leeres Resultat zurück (d.h. null Datensätze).
Nothing helped for me.
I fixed it like this:
foreach ($fieldNames as $fieldName) { if (is_array($fromRecord) && is_array($forRecord)) { $this->synchronizeFieldValues( $item, $fieldName, $fromRecord, $forRecord ); } }
Updated by Martin Waue almost 7 years ago
I had to delete child records without parent records.
SELECT uid,l18n_parent FROM `tt_content` WHERE l18n_parent NOT IN (SELECT uid FROM tt_content) AND l18n_parent > 0
Updated by Joerg Kummer almost 7 years ago
- Related to Bug #83940: L10nModeUpdater breaks if parent of translations is deleted added
Updated by Joerg Kummer almost 7 years ago
I added a patch at #83940 with the suggestion from Kurt Gusbeth