[TYPO3-dev] Workspaces and getting records

Chris Müller mueller at cyperfection.de
Wed Dec 9 13:48:24 CET 2009


Hi,

I now switched zu TYPO3 4.3 and recognized that my extensions doesn't 
work anymore in draft workspace preview. I used the method 
t3lib_BEfunc::getWorkspaceVersionOfRecord() to get the workspace version 
of a record. As the record contains dam references I need the new uid of 
this record to look up the probably changed image reference.

In Version 4.3 the sysext "version" became optional. So in the method 
t3lib_BEfunc::getWorkspaceVersionOfRecord() there is a new if-statement 
to check if "version" is loaded. Because "version" is now only a backend 
module and no more available in frontend that function returns always false.

Now I tried to use versionOL() and pi_getRecord(), but both functions 
gave me back the live uid, not the new uid of the workspace record. But 
I need the uid of the workspace record to get the appropriate record 
from dam via tx_dam_db::getReferencedFiles().

Okay, now I can query the record table on my own, having in mind that I 
have to check all the t3ver_states, deleted and so on. Then I use the 
record uid to query for the dam files.

But there must be a more easy way? Or is it the way is has to be?

Regards,
Chris.




More information about the TYPO3-dev mailing list