[BUG] Error when moving Metadata records in Backend List #1715
Copy link
Copy link
Open
Labels
☇ bugA non-security related bug.A non-security related bug.
Milestone
Description
Description
The Error occur in Kitodo.Presentation Backend, when moving Metadata records "up" or "down" in the list.
Although the action works in the End and the Item moves in List, the Error shows up.
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key "l18n_parent" in /var/www/html/vendor/typo3/cms-core/Classes/DataHandling/DataHandler.php line 2822
Reproduction
Steps to reproduce the behaviour:
- add default Metadata records with the "New Tenant" Module
- Click on the Arrow "Move up in list" / "Move down in list"
- see TYPO3\CMS\Core\Error\Exception
- Exit the page -> the action works and the Item has moved
Expected Behavior
No Exception Page
Screenshots and Examples
Environment
- Kitodo.Presentation
mainBranch (older Commitd692d7and newer w. v13 support771880) - RDBMS version: MariaDB 10.11
- TYPO3 version: 12.4.36
- PHP version: 8.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
☇ bugA non-security related bug.A non-security related bug.
Activity
beatrycze-volk commentedon Sep 4, 2025
The error comes directly from TYPO3 Framework.
The variable
$this->checkValue_currentRecordis an empty array. I have traced all assignments to this array and during the move operation it is not assigned, only accessed:beatrycze-volk commentedon Sep 4, 2025
Generally the problem disappears after adjustment in TCA:
fschoelzel commentedon Jan 29, 2026
Hello @beatrycze-volk,
now i have the same Problem as before, when i changed the
'l10n_mode'.It don't accept that the translation field has the same
index_nameas the l10n_parent.So it changes the
index_nameof the translated child if i move a field in the Backend. I think this is not how it supposed to be.(excuse the non translated labels)
See Screenshot:
beatrycze-volk commentedon Jan 29, 2026
It should not be so, I have tested solution on the system without translations. Do you have some idea how it can be solved differently?
michaelkubina-subhh commentedon Jan 30, 2026
We were looking at translations as well, but in another context....and also came across the issue with the
index_name. I believe the issue is more, how Kitodo.Presentation handles translations in general. From my observation we kind of hard-code localization for a subset of tables, resulting in these issues.Not that far with actual testing yet, but what i did experiment with, was to setup a page-translation for the storage folder:
After that, records can be localized via a click of a button:
When doing this for a metadata record for example, this does not result in a
index_name0but we get a sharedindex_nameMoving the entry up, does result in an exception at the moment:
But within the hierarchy it actually does get moved, without the
index_namebeing an issue:The entry in the database looks ok to me at first glance:
Creating entries with via
New Tenantdoes still work this way, and moving them does not result in theindex_nameissue anymore, but only said exception. Also this way has the benefit, that we can actually localize any table...which we now would not...or at least, which would not be possible without a page-localization of the storage folder. This means, we wold also be able to localize collections (and their descriptions!!), or library names and everything else.So, from what i believe, its partially a configuration / usage error...but we also dont provide instructions, on how to properly set up the Host, in order to utilize translations well.
Maybe we can find a way to resolve the localization not being resolved to the fullest (collections & libraries not being translated at the moment), by instructing the usage of a storage-folder localization and working with it throughout our portal..this would require some bug-fixing, adjustments to the TCA's and a clear instruction on how to setup a multilingual site.
sebastian-meyer commentedon Jan 30, 2026
Great observations! And yes, I think that's exactly the way it's intended by TYPO3.
fschoelzel commentedon Feb 2, 2026
The Description of @michaelkubina-subhh is exactly the behavior as i initially opened this Issue.
index_nameindex_name(now without the Exception Error)@michaelkubina-subhh I'm curious, do you tested the behavior on the latest version of the main branch?
michaelkubina commentedon Feb 11, 2026
@fschoelzel hi, yes, i have tested the behaviour with the latest version of the main branch. i was not aware, that you have had setup a site languages as well... but now, that i think of it...how else could the index_name have been duplicated.
Sorry, if i cause confusion here... i think we are all on the same page now.
datahandler issue
@beatrycze-volk has identified the datahandler as being an issue and that there seems to be no
l18n_parentbeing retrieved. I believe this is actually a typo3 bug and has nothing to do with our configuration ... forcing the retrieval of the parent from the database makes the exception go away:uniqueInPid's role
Also, simply removing
uniqueInPidfromeval(without any changes to the original datahandler), makes the exception go away as well! So, its simply not possible to use'l10n_mode' => 'exclude'and'eval' => 'uniqueInPid'at the same time - even more evidence, that it might be a typo3 bug.what now?
Setting the
l10n_modeofindex_nametoexclude, is the right way to do it. Because we (should) want theindex_nameto stay the same for translations no matter what. Without it multilingual setups run into issues of index_name copies with appended counter. Also handling these index_name copies in code is bad practice...as its happending in thetranslate()helper, which also would fail for sites with more then two languages as it only looks at index_names with a 0 (zero) appended.We could remove
uniqueInPidtemporarily to make the exception go away. But this way users can potentially createindex_namecollisions. But we could then also at least provide a'description' => 'some statement, that the index_name must be unique per folder'to soften the risk.I will file an issue in the typo3 bugtracker, describing the problem with both configurations not being possible at the same time as well as how the datahandler is missing the localization parent. Maybe their response can help, wether we are doing something fundamentally wrong or if the assumption is correct, that theres an actual bug in typo3.
michaelkubina commentedon Feb 17, 2026
Filed an issue on the Typo3 bugtracker:
https://forge.typo3.org/issues/108994
sebastian-meyer commentedon Feb 17, 2026
Thank you!