Feature #19611

Add a way to hook into the publish process for a workspace

Added by Erik Frister about 13 years ago. Updated over 11 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


There is currently no way that we can hook into the version swap method for a given record in the tcemain.php. This is needed for the next commerce release; so that when a record is published (switched into the LIVE Workspace) we can also publish related records that would otherwise stay connected to the old version.

Example use:
A product is to be published; the product record has related attributes which refer to the product uid. Without the hook, when the product is published, the attributes are not informed of the version swap and still refer to the (now) offline version of the record.

(issue imported from #M9793)


9793.patch (1.61 KB) 9793.patch Administrator Admin, 2008-11-14 10:54
9793_v2.diff (4.35 KB) 9793_v2.diff Administrator Admin, 2009-03-01 01:42
9793_v3.patch (4.23 KB) 9793_v3.patch Administrator Admin, 2010-04-11 23:18

Updated by Steffen Kamper almost 13 years ago

New hooks have to come with an interface. Indeed this makes it much easier to hook into tcemain.

Attached patch adds a hook for post-process versionSwap


Updated by Darren Clark almost 12 years ago

I can confirm that the patch 9793_v2.diff works correctly with typo3 4.3.2 and it would be good to get this into the core.

Test Code:

In ext_localconf.php

$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tcemainHook'][] = 'EXT:useextension/class.user_ux_t3lib_tceforms_inline.php:user_ux_t3lib_tcemainHook';

In class.user_ux_t3lib_tceforms_inline.php


class user_ux_t3lib_tcemainHook implements t3lib_tcemainHook {

function init(&$parentObject) {
function versionSwap_postProcess($table, $id, $swapWith, $swapIntoWS) {
t3lib_div::devLog("Version swap post process",'userextension');



Updated by Darren Clark almost 12 years ago

Updated patch against TYPO3_4-3-3 9793_v3.patch uploaded


Updated by Benni Mack over 11 years ago

I think this patch can be closed as well, as the version code is now in a separate hook and could be replaced by your own implementation very easily. Is that ok?


Updated by Ingo Renner over 11 years ago

adopted the title to be more in the line of a "feature" description

Also available in: Atom PDF