Bug #71596

Story #69617: FormEngine bugs

New Inline records can not be created in translated parent record

Added by Philipp Wrann almost 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2015-11-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #71712: 7 LTS: sys_file_reference IRRE elements not shown anymore in alternate languagesClosed2015-11-20

Actions
Related to TYPO3 Core - Bug #73609: Creating IRRE child element without language of parent elementClosed2016-02-22

Actions
Related to TYPO3 Core - Feature #81738: Create new IRRE CE in already translated CE v.7.6.19New2017-06-29

Actions
Has duplicate TYPO3 Core - Bug #71651: pages_language_overlay.media IRRE records not shown in BEClosed2015-11-18

Actions
Has duplicate TYPO3 Core - Bug #71803: Page Resources Media not translatableClosed2015-11-24

Actions
Has duplicate TYPO3 Core - Bug #72799: inline child record only translatable one timeClosed2016-01-18

Actions
#1

Updated by Mathias Schreiber almost 6 years ago

  • Target version changed from 7 LTS to Candidate for patchlevel
#2

Updated by Christian Kuhn almost 6 years ago

mmmh. sounds ugly ... will try to reproduce.

#3

Updated by Christian Kuhn almost 6 years ago

  • Parent task set to #69617
#4

Updated by Helmut Hummel almost 6 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

#5

Updated by Helmut Hummel almost 6 years ago

  • Status changed from Needs Feedback to Accepted

OK. there is indeed something broken when adding new images to translated elements

#6

Updated by Helmut Hummel almost 6 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

#7

Updated by Martin R. Krause almost 6 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.

#8

Updated by Christoph Bernhard almost 6 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

#9

Updated by Martin R. Krause almost 6 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.

#10

Updated by Philipp Wrann almost 6 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

#11

Updated by Markus Hölzle almost 6 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...

#12

Updated by Christoph Bernhard almost 6 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.

#13

Updated by stefan schreck almost 6 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

#14

Updated by Marc Bauer almost 6 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,
                );
            }

#15

Updated by Philipp Wrann almost 6 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.

#16

Updated by Philipp Wrann almost 6 years ago

Are there news on this? Will there be a bugfix in 7.3? This is kind of essential i would say.

#17

Updated by Philipp Wrann almost 6 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
#18

Updated by Philipp Wrann almost 6 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.

#19

Updated by Ralf Merz over 5 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

#20

Updated by Gerrit Code Review over 5 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

#21

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/46813

#22

Updated by Oliver Hader over 5 years ago

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

Updated by Gerrit Code Review over 5 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

#24

Updated by Oliver Hader over 5 years ago

  • Status changed from Under Review to Resolved
#25

Updated by Oliver Hader over 5 years ago

There still seem to be issues with directly creating new child elements which will be handled in a separate issue at #73609

#26

Updated by Christian Kuhn over 4 years ago

  • Related to Feature #81738: Create new IRRE CE in already translated CE v.7.6.19 added
#27

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF