Issue Bug Closed

#84602Footer in single tt_content element

Sven Burkert 04/04/18, 12:11 updated 10/02/18, 10:51

Description

There is a little display issue in the footer of a content element, see appended file “beview.png”: The framed area is the footer of that content element, but there shouldn’t be a footer, not even an empty footer.

That’s because of this code in function “tt_content_drawFooter” of class “PageLayoutView”:

if (!empty($GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn'])) {
    $info[] = htmlspecialchars($row[$GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn']]);
}

$GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn'] is always set to “rowDescription”, but $row['rowDescription'] is empty most times.

The resulting array $info is

array(1 item)
   0 => '' (0 chars)

but it should be an empty array.

Just write

if (!empty($GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn']) && $row[$GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn']]) { ...

and all should be fine.

Reviews 2