Issue Bug Closed

#16963Preview in Workspaces Module for Contentelements

Chris Zepernick 02/09/07, 19:05 updated 12/10/13, 01:14

Description

IF someone uses the clickmenu in workspaces to preview a record, the wrong link is generated for this clickmenu for the “view” item (for a tt_content record ).
This is caused through the fact the the alt.clickmenu.php uses the records pid also for content elements in workspaces. In Workspaces the pid for content elements is always “-1”. So page “-1” could not be found.

Same Error in 4.0 – 4.0.4 and 4.1 rc 1!!

Solution to this :

change in method “printDBClickMenu” in “typo3/alt_clickmenu.php:

if ($table==$GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘contentTable’]) {
$menuItems[‘view’]=$this->DB_view($this->rec[‘pid’],’#’.$uid);
}

to this code:

if ($table==$GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘contentTable’]) {
if($this->rec[‘pid’] == -1){
$this->rec_alt = t3lib_BEfunc::getRecordWSOL($table,$this->rec[‘t3ver_oid’]);
$menuItems[‘view’]=$this->DB_view($this->rec_alt[‘pid’],’#’.$uid);
}else{
$menuItems[‘view’]=$this->DB_view($this->rec[‘pid’],’#’.$uid);
}
}
(issue imported from #M4953)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.