[TYPO3-dev] Outcommented code in tcemain which solves a bug > what to do?

Georg Ringer news at ringerge.org
Mon Jun 28 15:18:19 CEST 2010


Hi,

I have found a solution for a bug in tcemain which consists of using a
code which has been commented out since 4.2.0 (rev #829 by Kasper with
comment "More workspace dev"). The code was never used and has always
been not in use

The code looks like this in t3lib_tcemain.php->copyRecord() [1]

The bug which is being fixed is [2]. It is very simple to reproduce by
using DAM and TYPO3 (all latest trunk but doesnt really matter):

1) Switch to a workspace and create a new page including a content
element "Text w image".
2a) Copy the page to somewhere else and check that the image is not
referenced there
OR
2b) Copy the content element itself to the same page and check that the
image is not referenced either.

As the code comments of the outcommented code looks quite ok
------
// In case the record to be moved turns out to be an offline version, we
have to find the live version and work on that one (this case happens
for pages with "branch" versioning type)

// Get workspace version of the source record, if any: Then we will copy
workspace version instead:

// Now, the $uid is the actual record we will copy while $origUid is the
record we asked to get copied - but that could be a live version.
------

I am still not sure if there are any side effects with using the code. I
would be very happy for any comments

Georg


[1] http://pastebin.com/a4njkmdb
[2] http://bugs.typo3.org/view.php?id=14017




More information about the TYPO3-dev mailing list