Bug #56882
Can not translate IRRE elements
Status: | Resolved | Start date: | 2014-03-13 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | IRRE | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: |
Description
Translation of irre elements is buggy.
Scenario 1
IRRE tutorial is installed
- create new CE,
- go to "IRRE" tab
- create new irre element
- save
localize this element to other language
=> CE is localized, but irre elements are not
Scenario2
Create plugin with FAL field in flexform
- create CE of this plugin
- add images to the FAL field
- save
- translate this element
=> images are localized, but an additional row i shown on the list of images
When testing scenario 2 with flv files instead of images, no records were correctly localized
Related issues
Associated revisions
[BUGFIX] Show correct number of inline records defined in flexform
getRelatedRecordsArray() is expecting comma separated list of record ids
Before this patch the full flexform xml was passed.
Now we detect whether a field is a flexform and try to extract the
correct field values from it.
Resolves: #56882
Releases: master, 6.2
Change-Id: I50db5dfd5f07bbc20e369c0a07f2f294afb85321
Reviewed-on: http://review.typo3.org/32986
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Daniel Alder <dalder@snowflake.ch>
Tested-by: Daniel Alder <dalder@snowflake.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Show correct number of inline records defined in flexform
getRelatedRecordsArray() is expecting comma separated list of record ids
Before this patch the full flexform xml was passed.
Now we detect whether a field is a flexform and try to extract the
correct field values from it.
Resolves: #56882
Releases: master, 6.2
Change-Id: I50db5dfd5f07bbc20e369c0a07f2f294afb85321
Reviewed-on: http://review.typo3.org/32985
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
History
#1 Updated by Oliver Hader over 1 year ago
- Status changed from New to Needs Feedback
Please add the TCA field configuration for the relative parents
#2 Updated by Oliver Hader over 1 year ago
Please use https://git.typo3.org/Packages/TYPO3.CMS.git/tree/HEAD:/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial (e.g. linking that from the Core sources to your typo3conf/ext/ directory), the irre_tutorial in TER or SVN is outdated for 6.2 (new version after 6.2 release).
#3 Updated by Oliver Hader over 1 year ago
- File test_case_1.png added
Could not reproduce your first test case (see test_case_1.png).
I did not check the FlexForm issue, but most likely there are problems I guess...
#4 Updated by Oliver Hader over 1 year ago
- Category set to IRRE
#5 Updated by Tymoteusz Motylewski over 1 year ago
- File scenario1_newIrre_tutorial.png added
- File scenario1_newirre2.png added
I've just tested it again with newest master version and irre_tutorial from core.
I've attached a screenshot (left side is a original record (english), right side is a translated record).
I've added new record on the left side, by clicking "create new under IRRE".
Problems:
A) if you colapse clild records, and then close the CE and open it again, you got different views depending on which record you expand first (the 1nff or IRRE). If you expand the 1nff first, then title is show correctly, but in IRRE "general" and "visibility" tabs are empty.
If you expand IRRE element first, then it is shown correctly, but the 1nff record has empty title
B) after translating the parent record (CE)there is a record visible in the 1nff, but it is missing in the IRRE section.
see right side of the screenshot
C) After adding second record to the english CE, and saving it, there are some problems in the translated CE
see screenshot scenario1_newirre2.png
notice that "Changed in original translation:" contains text
"Wellness Well-Being Hotel Rosengarten"
which is not correct - this is a title of the Hotel record with id 1, not the one associated with English CE.
Also "Localize all records" on the IRRE section doesn't work.
If you translate the record by clicking "Localize all records" in 1nff secion, then record is correctlt translated, but on the irre section it doesnt show up.
#6 Updated by Tymoteusz Motylewski over 1 year ago
- File scenario2_mediacenter.png added
- File scenario2_B_mediacenter.png added
- File mediacenter.zip added
SCENARIO2:
I've attached test extension.
A) screenshot scenario2_mediacenter.png
1. Create new CE "plugin"
2. Select "mediacenter" plugin
3. Attach 2 images in the plugin flex form
4. translate record using "copy default content elements"
5. You'll get a nice exception
#1317178794: No fileusage (sys_file_reference) found for given UID. (More information)
screenshot attached (notice the getFileReferenceObject("2") call - it takes number of related images as a file reference. If we had 3 images, then it will call getFileReferenceObject("3"))
6. reload the page, edit translated record,
only one image will be visible, but grayed out. The "localize" button is not working.
B) screenshot scenario2_B_mediacenter.png
1. Create new CE "plugin"
2. Select "mediacenter" plugin
3. Attach 3 images in the plugin flex form and one flv file
4. translate record using "Language: " selectbox on the top of the site, choose "Dansk NEW" from this selectbox
5. In the tranlstaed record you will get completely wrong images, see right side of the screenshot.
#7 Updated by Tymoteusz Motylewski over 1 year ago
- File scenario2_A_exception.png added
attach screenshot of the exception from scenario 2A
#8 Updated by Alexander Opitz about 1 year ago
Hi,
does this issue still exists in 6.2.4?
#9 Updated by Tymoteusz Motylewski about 1 year ago
- File scenario2_new.png added
I've retested the issue with the recent master (Sun Jul 27 e172269f8db8720083c1e74eca03d9662a331185 ).
It is better, but the issue is NOT yet resolved.
Scenario 2:
A)
no exception any more, but after translating the record there are additional images in the localized record (see scenario2_new.png)
B)
works the same way as A) now
#10 Updated by Alexander Opitz 12 months ago
- Status changed from Needs Feedback to New
#11 Updated by Gerrit Code Review 10 months ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32985
#12 Updated by Gerrit Code Review 10 months ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32985
#13 Updated by Gerrit Code Review 10 months ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32986
#14 Updated by Daniel Alder 10 months ago
Tymoteusz Motylewski wrote:
I've retested the issue with the recent master (Sun Jul 27 e172269f8db8720083c1e74eca03d9662a331185 ).
It is better, but the issue is NOT yet resolved.Scenario 2:
A)
no exception any more, but after translating the record there are additional images in the localized record (see scenario2_new.png)
B)
works the same way as A) now
Since the function which got the releated records didn't expected a flexform xml field (pi_flexform) the ongoing process take the field as 'field with comma separated values'. In addition the 'explode' will be done over the whole xml, which is in 'pi_flexform'. So the result is not an array of IDs only. First and last array records includes the xml definitions. So the related records are incomplete as mentioned int the picture scenario2_new.png
Example:
Inline field used via TCA
Incomming field record: 1,2,3
Inline field used via flexfor
<T3FlexForms>
<data>
<sheet index="sDEF">
<language index="lDEF">
<field index="settings.irre.records">
<value index="vDEF">1,2,3</value>
</field>
</language>
</sheet>
</data>
</T3FlexForms>
The following patch will take care of this issue
#15 Updated by Gerrit Code Review 10 months ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32986
#16 Updated by Gerrit Code Review 10 months ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32986
#17 Updated by Gerrit Code Review 10 months ago
Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32985
#18 Updated by Daniel Alder 10 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5ee67bcaa9455126a3af4f77b7bebbf0a7545531.