[TYPO3-core] RFC #16147: Bug: getRecordOverlay fetches "Versioning Preview Overlay" but does not return the fields _ORIG_uid and _ORIG_pid

Andreas Kiessling kiessling at pluspol.info
Fri Oct 29 09:27:19 CEST 2010


Hi,

This is an SVN patch request.

Type: Bugfix

Bugtracker reference: http://bugs.typo3.org/view.php?id=16147

Branches: 4-4, trunk

Problem:
When a page is rendered, the class t3lib_pageSelect usually does the 
language overlay with "getRecordOverlay". Here, "versionOL" is called 
and up to now everything is still fine and will be if you do not use 
workspaces or only have default language. If you need the the real uid 
of the record in the workspace (e.g. to fetch attached IRRE records), 
that value should be available in the field "_ORIG_uid", which is set by 
"versionOL", but "getRecordOverlay" does not add these fields when it 
iterates over the record and does the actual overlaying.

How to test:
- just output the cObj data in your favourite frontend plugin and watch 
the fields uid, _LOCALIZED_UID, _ORIG_uid and _ORIG_pid
   $content = t3lib_div::view_array($this->cObj->data);

- create a content element in default language in LIVE workspace
- translate that record in a workspace and have a look at the uid of the 
record in the workspace
- watch the output of your frontend plugin and the missing fields

If the default element is also versioned, the right _ORIG_uid is already 
set, but not if only the localized element is new in the workspace.

Solution: add _ORIG_uid and _ORIG_pid when the overlay record is merged 
with the default record

Regards,
Andreas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 16147_v1.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101029/e4bddd68/attachment.asc>


More information about the TYPO3-team-core mailing list