Project

General

Profile

Actions

Bug #17580

closed

Active in template::getDynTabMenu() does not work

Added by Malte Jansen about 17 years ago. Updated over 14 years ago.

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

0%

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

Description

..because "$isActive = strcmp($def['content'],'');" is never true because "$def['content']" is never empty.

Solution:
t3lib_tceforms::getMainFields() {
if ($TCA[$table]['columns'][$theField]) {
$sFieldPal='';

if ($parts[2] && !isset($this->palettesRendered[$this->renderDepth][$table][$parts[2]]))    {
$sFieldPal=$this->getPaletteFields($table,$row,$parts[2]);
$this->palettesRendered[$this->renderDepth][$table][$parts[2]] = 1;
}
$sField = $this->getSingleField($table,$theField,$row,$parts[1],0,$parts[3],$parts[2]);
if ($sField)    { 
$sField.= $sFieldPal;
/*+*/ $out_array_meta[$out_sheet]['elementFound'] = true;
}
$out_array[$out_sheet][$out_pointer].= $sField;
} elseif ($theField=='--div--') {
...
...
// Return the imploded $out_array:
if ($out_sheet>0) { // There were --div-- dividers around...
// Create parts array for the tab menu:
$parts = array();
foreach ($out_array as $idx => $sheetContent) {
if ($out_array_meta[$idx]['title'] == 'Collegium') {
#print_r($sheetContent);
echo count($sheetContent);
echo $out_array_meta[$idx]['title']."<br /><br />";
}
$parts[] = array(
'label' => $out_array_meta[$idx]['title'],
/*modified*/ 'content' => (!$out_array_meta[$idx]['elementFound'] ? '': '<table border="0" cellspacing="0" cellpadding="0" width="100%">'.
implode('',$sheetContent).
'</table>'
);
}
...
}

The $sheetContent is never realy empty, so I could not use empty($sheetContent). The solution is additonal var which is set true if there is a "real" element.

In the template::getDynTabMenu() instead of the A-tag there should be span with some styles ;)

(issue imported from #M6259)


Files

DynTabMenu_v1.patch (3.83 KB) DynTabMenu_v1.patch Administrator Admin, 2007-10-09 20:27
disable_empty_tabs_v1_(4.1.3).patch (914 Bytes) disable_empty_tabs_v1_(4.1.3).patch Administrator Admin, 2007-10-23 21:43
disable_empty_tabs_v2_(trunk).patch (6.5 KB) disable_empty_tabs_v2_(trunk).patch Administrator Admin, 2007-10-24 15:39

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #18281: Tabs disappear when BE-editing a record that contains IRREClosedOliver Hader2008-02-23

Actions
Actions #1

Updated by Malte Jansen about 17 years ago

Solved in Bug:
0006173

Actions #2

Updated by Malte Jansen about 17 years ago

Added Patch...

Actions #3

Updated by Malte Jansen about 17 years ago

I have added a new version.
I have found a better way to check if the tab should be wrapped and than activated.

Actions #4

Updated by Malte Jansen about 17 years ago

Added Trunk Version

Actions #5

Updated by Dmitry Dulepov about 17 years ago

Committed as revision 2741

Actions

Also available in: Atom PDF