[TYPO3-dam-devel] RFC: Bugfix: 7344: DAM does not preview correct files in workspaces

Ingo Renner ingo at typo3.org
Fri May 16 13:48:16 CEST 2008


Hi all,

the patch(es) provided so far seemed to work but actually were only 
curing the symptoms, not the cause.

The patches used fields like _ORIG_uid, which you should not fiddle with 
when using workspaces. Instead you are advised to use the provided 
functions from t3lib_BEfunc

* getWorkspaceVersionOfRecord()
* workspaceOL()
* ...

The new patch (attached her and in the BT) fixes the cause of the Bug by 
checking whether we are running in a WS and whether it is not the LIVE 
WS. If that is the case it uses getWorkspaceVersionOfRecord() to 
retrieve the worspace/shadow version of the LIVE version and creates the 
query for the referenced files using the UID from the WS/shadow version 
   which later fetches the files.

You can test this with dam_ttcontent f.e.:

* create a image or text w/image CE in LIVE WS and add no or one image.
* switch to DRAFT WS, then add more images.
* does images shouldn't be visible in the LIVE WS or on the website yet
* without the patch the new images should be visible when editing the 
CE, but not in the page module, nor in the WS preview
* with the patch the images should appear in the page module and the WS 
preview


all the best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7344_dam_ws.diff
Type: text/x-diff
Size: 6440 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20080516/21456637/attachment.diff 


More information about the TYPO3-team-dam mailing list