[TYPO3-core] Reminder: RFC #13250: Bug: Translation handling for IRRE combo records broken

Marcel Greter mgr at rtpartner.ch
Tue Apr 27 14:14:06 CEST 2010


REMINDER

On Apr 20, 2010, at 5:05 PM, Marcel Greter wrote:

> Hi Susanne/list,
> 
> I checked myself and you're right, my patch did not yet fix this bug ;-)
> 
> -			if ($config['localizationMode']=='select') {
> +			if ($config['behaviour']['localizationMode']=='select') {
> 				$parentRecord = $this->getRecord(0, $parent['table'], $parent['uid']);
> 				$parentLanguageField = $GLOBALS['TCA'][$parent['table']]['ctrl']['languageField'];
> 				$childLanguageField = $GLOBALS['TCA'][$current['table']]['ctrl']['languageField'];
> -				if ($parentRecord[$languageField]>0) {
> -					$record[$childLanguageField] = $parentRecord[$languageField];
> +				if ($parentRecord[$parentLanguageField]>0) {
> +					$record[$childLanguageField] = $parentRecord[$parentLanguageField];
> 				}
> 			}
> 
> Not sure why I missed that one.
> I know I had it working when I posted the first patch.
> Anyway, that seems to fix the problem.
> 
> My patch also fixes another bug which is exposed within "m:n asymmetric combo" (alt language -> create new).
> With only the patch above, the new relation record will have the correct language but the combo record not.
> Screenshot: http://bayimg.com/image/iamdaaaca.jpg
> 
> +				// set language for new records to the same as the given record
> +				$relationLanguageField = $GLOBALS['TCA'][$config['foreign_table']]['ctrl']['languageField'];
> +				$recordLanguageField = $GLOBALS['TCA'][$comboConfig['foreign_table']]['ctrl']['languageField'];
> +				if ($rec[$relationLanguageField]>0) {
> +					$comboRecord[$recordLanguageField] = $rec[$relationLanguageField];
> +				}
> 
> Have a nice Day!
> 
> Marcel Greter
> 
> <t3bug-0013250.patch>_______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
> 
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core



More information about the TYPO3-team-core mailing list