[TYPO3-core] RFC: #10165: FlexForms: wrong mm-relations after copy and localize

Peter Kuehn [wmdb] peter.kuehn at wmdb.de
Sat Jan 31 13:45:39 CET 2009


Hi yall,

attached youll find an updated version of the suggested patch and the 
demo-extension. Please use these ones to test and discuss.
The use of the demo didnt change, so there was no need to update the 
documentation.

The fix is in production now on http://www.planet-schule.de/sf/03_wis00.php

Credits to them for their patience and support.

gRTz
pekue

Peter Kuehn [wmdb] schrieb:
> Hi yall!
> 
> This is a SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker references: http://bugs.typo3.org/view.php?id=10165
> 
> Branches: TYPO3 4-1, TYPO3 4-2, trunk
> 
> 
> Problem:
> 
> On copy and localize of a record with a FlexfForm that contains a 
> MM-reference field the resulting record points to wrong relations.
> The needed rows in the MM-table are created, but the field uid_local 
> contains the number of relations instead of the uid of the correct 
> target record.
> 
> 
> Solution:
> 
> The comment in copyRecord_flexFormCallBack() says "If references are set 
> for this field, set flag so they can be corrected later (in 
> ->remapListedDBRecords())" but the remaping fails.
> Instead t3lib_loadDBGroup can be used to resolve the values on 
> beforehand. The records are created correctly by process_datamap() 
> afterwards and dont need to be remaped lateron.
> 
> 
> Notes:
> 
> Maybe this ugly beast first showed up in 2006, when Rene wrote mmforeign 
> and was ported from their into the core. I reported it back then under 
> http://bugs.typo3.org/view.php?id=2381 - obviously wrong filed in tx_dam 
> since this happens to all flexforms holding mm-relations.
> Its mentioned as well in the comments to 
> t3lib_TCEmain->remapListedDBRecords_procDBRefs() (line 5019) but imho 
> its better to create the records correctly than to remap them afterwards.
> 
> Today I stuck with it for the third time in two years - I realy hope the 
> diff solves it with no side effects *cantSeeItAnyLonger
> If it does, it solves #2381 as well and is one fifths on the way to 
> finally marry DAM and Templavoila ;)
> 
> 
> gRTz
> pekue
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: T3X_wmdb_rfc10165_demo-1_1_0-z-200901311256.t3x
Type: application/octet-stream
Size: 144563 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090131/e4e9dc7b/attachment-0001.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_10165_fix1.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090131/e4e9dc7b/attachment-0001.txt 


More information about the TYPO3-team-core mailing list