Bug #71596
closedStory #69617: FormEngine bugs
New Inline records can not be created in translated parent record
100%
Description
Its not possible to create new inline records when editing a translation.
To reproduce:
install fresh typo3 7 LTS.
create one page, one sys_language, translate the page.
Create content element of type textmedia in default language
Switch to translation, translate the content element (no copy).
Create new fal relation in translation -> does not work
Create new fal relation in def language -> does not show up in translation
Language-exclusive records can have inline records
Create new content element in language > 0 (exclusive)
Add new fal relation -> does work BUT the language field is not set correctly
This also affects all other inline related records.
Updated by Mathias Schreiber about 9 years ago
- Target version changed from 7 LTS to Candidate for patchlevel
Updated by Christian Kuhn about 9 years ago
mmmh. sounds ugly ... will try to reproduce.
Updated by Helmut Hummel about 9 years ago
- Status changed from New to Needs Feedback
Philipp Wrann wrote:
Create new fal relation in translation -> does not work
What exactly does not owrk?
Create new fal relation in def language -> does not show up in translation
How exactly do you expect to show up? In the backend it never did. in frontend it shows up correctly
Updated by Helmut Hummel about 9 years ago
- Status changed from Needs Feedback to Accepted
OK. there is indeed something broken when adding new images to translated elements
Updated by Helmut Hummel about 9 years ago
Helmut Hummel wrote:
OK. there is indeed something broken when adding new images to translated elements
When adding an new image to a translated CE, a sys_file_reference is created with sys_language_uid = 0
Additionally, even when fixing this to 1 in the db, the item is not shown, unless l10n_parent of the CE is set to 0
Updated by Martin R. Krause about 9 years ago
And please keep in mind that the sys_file_reference record does not need a l10n_parent. That is an option. It should work in BE und FE without it.
Updated by Christoph Bernhard almost 9 years ago
Martin R. Krause wrote:
And please keep in mind that the sys_file_reference record does not need a l10n_parent. That is an option. It should work in BE und FE without it.
Yep, but this is definitively not without l10n_parent the case in BE 7.6 > see https://forge.typo3.org/issues/71712
Updated by Martin R. Krause almost 9 years ago
Any infos on this bug or its dublicated? This so huge, that 7.6 is almost unusable until it is fixed. I would be very grateful, if we can get some information if someone is working on this and when we can expect a fix.
Updated by Philipp Wrann almost 9 years ago
+1
We also have huge problems, we just had a workshop with 20 editors and had to explain that some features (i personally consider basics) can not be used yet. I would like to start digging in the code but only have very very little time left at the moment.
Is there already work in progress?
regards
Updated by Markus Hölzle almost 9 years ago
Is there already a patch for this? It is a very big problem!
If you change the "sys_language_uid" and the "l10n_parent" manually in the "sys_file_reference" table, the image will be shown in the backend - but not in the frontend. So this is more than just a bug in the backend. (I tried it with translated objects from an extbase extension which have "just an image")
With this issue TYPO3 7 is really not usable for multi-language projects...
Updated by Christoph Bernhard almost 9 years ago
Markus Hölzle wrote:
Is there already a patch for this? It is a very big problem!
Check out this patch under review: https://review.typo3.org/45075 (from issue https://forge.typo3.org/issues/71712)
Couldn't test it so far but hope it will fix this. Will test asap too.
Updated by stefan schreck almost 9 years ago
Sorry but this PATCH is just a cosmetically patch to show them in the Backend.
But they won't get shown in the FE.
And YES this is a unbelievable huge BUG.
I am stucked with several multi-language Sites too.
I can't imagine how other deal with this.
Downgrade to 7.5?
How can you tell that your customers?
Best
Updated by Marc Bauer almost 9 years ago
Hi,
I think I've found a solution. The Problem is that the localization uid is setting as array but it should be an integer.
\TYPO3\CMS\Backend\Controller\FomrInlineAjaxController::synchronizeLocalizeAction Line 364 - 376
if (MathUtility::canBeInterpretedAsInteger($type)) { $cmd[$parent['table']][$parent['uid']]['inlineLocalizeSynchronize'] = array( 'field' => $parent['field'], 'language' => $parentLanguage[0], 'ids' => array($type), ); } else { $cmd[$parent['table']][$parent['uid']]['inlineLocalizeSynchronize'] = array( 'field' => $parent['field'], 'language' => $parentLanguage[0], 'action' => $type, ); }
Updated by Philipp Wrann almost 9 years ago
I also discovered problems when adding MM relations (categories) in extbase context to translated entities.
In general the behaviour of typo3/extbase for such situations is insufficient.
It is extremely hard to load an entity in a different language and nearly impossible to update it without destroying something of the original language content.
It takes hundereds of lines of code working with the PersistenceSession / Manager/ TSFE, etc.
Updated by Philipp Wrann almost 9 years ago
Are there news on this? Will there be a bugfix in 7.3? This is kind of essential i would say.
Updated by Philipp Wrann almost 9 years ago
Some informations:
TYPO3 Version = 2032a28929a30a17ee9054416ef85cd2945c0a98
I tested tt_content.image and my own configuration
tt_content.media should be clear, here is the tca of my test field (applied with ExtensionManagementUtility::getFileFieldTCAConfig():
[media] => Array ( [exclude] => [label] => LLL:EXT:EXTNAME/Resources/Private/Language/locallang.xlf:media [config] => Array ( [type] => inline [foreign_table] => sys_file_reference [foreign_field] => uid_foreign [foreign_sortby] => sorting_foreign [foreign_table_field] => tablenames [foreign_match_fields] => Array ( [fieldname] => media ) [foreign_label] => uid_local [foreign_selector] => uid_local [foreign_selector_fieldTcaOverride] => Array ( [config] => Array ( [appearance] => Array ( [elementBrowserType] => file [elementBrowserAllowed] => gif,jpg,jpeg,bmp,png,pdf,svg,ai,mp3,wav,mp4,webm,youtube,vimeo ) ) ) [filter] => Array ( [0] => Array ( [userFunc] => TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter->filterInlineChildren [parameters] => Array ( [allowedFileExtensions] => gif,jpg,jpeg,bmp,png,pdf,svg,ai,mp3,wav,mp4,webm,youtube,vimeo [disallowedFileExtensions] => ) ) ) [appearance] => Array ( [useSortable] => 1 [headerThumbnail] => Array ( [field] => uid_local [width] => 45 [height] => 45c ) [showPossibleLocalizationRecords] => [showRemovedLocalizationRecords] => [showSynchronizationLink] => [showAllLocalizationLink] => [enabledControls] => Array ( [info] => 1 [new] => [dragdrop] => 1 [sort] => [hide] => 1 [delete] => 1 [localize] => 1 ) [createNewRelationLinkTitle] => LLL:EXT:fluid_styled_content/Resources/Private/Language/Database.xlf:tt_content.media_references.addFileReference ) [behaviour] => Array ( [localizationMode] => select [localizeChildrenAtParentLocalization] => 1 ) [foreign_types] => Array ( [0] => Array ( [showitem] => --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette ) [1] => Array ( [showitem] => --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette ) [2] => Array ( [showitem] => --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette ) [3] => Array ( [showitem] => --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.audioOverlayPalette;audioOverlayPalette, --palette--;;filePalette ) [4] => Array ( [showitem] => --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.videoOverlayPalette;videoOverlayPalette, --palette--;;filePalette ) [5] => Array ( [showitem] => --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette ) ) ) [l10n_mode] => mergeIfNotBlank )
- Original records are not displayed at translations if the field is configured as mergeIfNotBlank (and they should be)
- If a inline element is created at a translated record, the language field is not set correctly (so all inline elements are sys_language=0)
- BUT: when field is not configured as mergeIfNotBlank (so it will be copied) the value is set correctly if a translation is created from the original content
Updated by Philipp Wrann almost 9 years ago
First issue solved:
Original records are not displayed at translations if the field is configured as mergeIfNotBlank (and they should be)
If you set appearance.showPossibleLocalizationRecords = TRUE your parent records are shown.
Best practice will probably be to set all options to TRUE:
showAllLocalizationLink = TRUE
showPossibleLocalizationRecords = TRUE
showRemovedLocalizationRecords = TRUE
showSynchronizationLink = TRUE
The initial issue will be solved in 7.3, its possible to create inline elements at translations BUT the language-values will still not be set correctly.
Updated by Ralf Merz almost 9 years ago
Hi,
according to:
showAllLocalizationLink = TRUE
showPossibleLocalizationRecords = TRUE
showRemovedLocalizationRecords = TRUE
showSynchronizationLink = TRUE
These settings are use in EXT:news, too. When I want to localize the FAL images, I have the following behavior:
I´ve 3 languages, DE (default), EN and FR. DE has some images (field:fal_media). When I switch to EN, I press „localize all records“ which works fine. Then I go to FR, when I click „localize all records“ nothing happens and for each image I find this entry in sys_log: "[newlog()] Localization failed; There already was a localization for this language of the record!“
The other way around, when I first „localize all records“ in FR, it works, then in EN it doesn´t work. What I can see in sys_file_reference is that, after creating the FR localization of the images, they also have sys_language_uid=1 in DB (which means EN). The other fields of the news records itself are correct.
So, as news uses FAL, I guess this is core-related, isn´t it?
TYPO3 7.6.2, news 4.1.0
Can somebody help?
Thanks and regards
merzilla
Updated by Gerrit Code Review over 8 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/46813
Updated by Gerrit Code Review over 8 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/46813
Updated by Oliver Hader over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset fc1c8dc2250b5ebf24211f2eec842bc5e9de915c.
Updated by Gerrit Code Review over 8 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46819
Updated by Oliver Hader over 8 years ago
- Status changed from Under Review to Resolved
Applied in changeset 578a6eeaf3df6800c9d7c6110cc806c808913109.
Updated by Oliver Hader over 8 years ago
There still seem to be issues with directly creating new child elements which will be handled in a separate issue at #73609
Updated by Christian Kuhn over 7 years ago
- Related to Feature #81738: Create new IRRE CE in already translated CE v.7.6.19 added