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

Andreas Wolf typo3ml at andreaswolf.info
Mon Jul 12 12:06:43 CEST 2010


Am 28.06.10 15:18, schrieb Georg Ringer:
> 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

I had a look at the code and I'm a bit confused about it. First there is
searched for a live version, just to search for a workspace version
again afterwards. So what happens when you hand the function a record in
a workspace? Is the live or the workspace version used after this
procedure? It's not really clear to me on what this function would
operate under which circumstances.


> 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.

From what I saw in the code, shouldn't it suffice to just change an
existing record in the workspace and then copy it? Then the live record
should be copied instead (which is wrong if you are in workspace).

This problem is somehow related to #3531, which also dealt with record
relations in MM tables (I noticed it especially with DAM records).


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

I can't tell about side effects either, but from what I see this code at
least fixes some "live-version-centerdness" of copyRecord().

Did you debug an example with and without this code and compare the uids
that are involved? It would really help to have an example.


Regards
Andreas



More information about the TYPO3-dev mailing list