Bug #16963

Preview in Workspaces Module for Contentelements

Added by Chris Zepernick almost 15 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Should have
Category:
Workspaces
Target version:
-
Start date:
2007-02-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

#1

Updated by Dmitry Dulepov over 14 years ago

Chris, please, next time submit a proper patch because we need unified diff patch to apply changes to core. This piece of code uses undefined class member named 'rec_alt'. It is unclear why you use class member and not simple local variable. I'll have to look more to the code finding posible connections. It could be much easier and faster with unified diff patch.

#2

Updated by Dmitry Dulepov over 14 years ago

Fixed in trunk/4.2 (rev 2196) and TYPO3-4.1 (rev 2197)

#3

Updated by Michael Stucki almost 8 years ago

  • Category set to Workspaces
#4

Updated by Michael Stucki almost 8 years ago

  • Project changed from 624 to TYPO3 Core
  • Category changed from Workspaces to Workspaces
  • Target version deleted (0)

Also available in: Atom PDF