Bug #57063

Parent language is not applied to new child records

Added by David Greiner over 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2014-03-19
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:IRRE Spent time: -
Target version:-
TYPO3 Version:6.1 Is Regression:No
PHP Version:5.3 Sprint Focus:
Complexity:medium

Description

Hi!

When creating a element in another language than the default language and adding a child element via IRRE, i am expecting that the child element gets the same language as the parent element.

For instance a news element from tx_news:

  1. Create new news element and choose a language which is not defined as default
  2. save
  3. add a media element via irre
  4. now you have to select the language in the media element again

This behaviour is not very usable for editors.

InlineElement.patch Magnifier (915 Bytes) David Greiner, 2014-04-09 11:55

InlineElement_2nd.patch Magnifier (973 Bytes) David Greiner, 2014-04-09 13:52


Related issues

related to Core - Bug #48883: Wrong sys_language_uid in sys_file_reference New 2013-06-05
related to Core - Bug #40656: t3lib_TCEforms_inline->createNewRecord doesn't create loc... Resolved 2012-09-05
related to Core - Feature #60026: Set explicitly 'readOnly' sys_language_uid of child to va... New 2014-07-01
duplicated by Core - Bug #21964: New child records created from a translated record have d... Closed 2010-01-15

Associated revisions

Revision cf9ca274
Added by David Greiner about 1 year ago

[BUGFIX] Parent language is not applied to new child records

If localizing a parent-child structure, usually the language
of the parent element shall be applied to related child records
as well as new child records.

Due to a missing array segment, the accordant section in the
the InlineElement source code never was processed.

Resolves: #57063
Releases: 6.2, 6.1
Change-Id: I7e563044f9889538f9b8171f71f7685722db8266
Reviewed-on: https://review.typo3.org/30448
Reviewed-by: Markus Klein
Reviewed-by: David Greiner
Reviewed-by: Wouter Wolters
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

Revision 3e6e8ec8
Added by David Greiner about 1 year ago

[BUGFIX] Parent language is not applied to new child records

If localizing a parent-child structure, usually the language
of the parent element shall be applied to related child records
as well as new child records.

Due to a missing array segment, the accordant section in the
the InlineElement source code never was processed.

Resolves: #57063
Releases: 6.2, 6.1
Change-Id: I7e563044f9889538f9b8171f71f7685722db8266
Reviewed-on: https://review.typo3.org/30472
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

History

#1 Updated by David Greiner over 1 year ago

I think there is a bug in /typo3/sysext/backend/Classes/Form/Element/InlineElement.php

Defining

'behaviour' => array(
'localizationMode' => 'select',
...
),

should be neccessary since it is described in http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Inline/Index.html#columns-inline-properties-behaviour

Adding this to the TCA configuration does not take effect cause of InlineElement.php:1223 checks for $config['localizationMode'] and not for $config['behaviour']['localizationMode'].

This is what the attached patch updates.

The patch is for the current master branch (6.2) in https://git.typo3.org/Packages/TYPO3.CMS.git

#2 Updated by David Greiner over 1 year ago

Second patch is better.

#3 Updated by Oliver Hader about 1 year ago

  • Status changed from New to Accepted
  • Complexity set to medium

I'll have a look - thx for the patch!
Besides that, I could reproduce the misbehavior.

#4 Updated by Oliver Hader about 1 year ago

  • PHP Version set to 5.3

#5 Updated by Oliver Hader about 1 year ago

  • Subject changed from IRRE: Use localization of parent element to Parent language is not applied to child records

#6 Updated by Oliver Hader about 1 year ago

  • Subject changed from Parent language is not applied to child records to Parent language is not applied to new child records

#7 Updated by Gerrit Code Review about 1 year 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/30448

#8 Updated by Oliver Hader about 1 year ago

David, I modified your patch a little bit, however it was the correct place and correct bug analysis! Good catch & thanks!

#9 Updated by David Greiner about 1 year ago

Great. Thx for that :)

#10 Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30472

#11 Updated by Teamgeist Medien about 1 year ago

Just wasted a half day with handling the complications without this function working. Thanks alot!

#12 Updated by David Greiner about 1 year ago

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

Also available in: Atom PDF