Project

General

Profile

Actions

Bug #14935

closed

Typo3 can't display a single "0" in a table cell

Added by Markus Walter over 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-08-20
Due date:
% Done:

0%

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

Description

In a text element containing a table a single "0" in a cell isn't rendered properly in the FE outbut but a "1" (for example) does:

<td>0<td> becomes to <td> </td> but
<td>0 </td> stays <td>0 </td> and
<td>1</td> stays <td>1</td>

I've tested various setups with Typo 3.7.1 and 3.8. with different RTEs. Even putting the HTML-table code in tt_content didn't produce the right output.

(issue imported from #M1391)


Files

bug_1391.diff (841 Bytes) bug_1391.diff Administrator Admin, 2005-08-21 02:42

Related issues 2 (0 open2 closed)

Has duplicate TYPO3 Core - Bug #14199: Single Value "0" not parsedClosedMichael Stucki2005-10-07

Actions
Has duplicate TYPO3 Core - Bug #14910: Typo3 can't display a single "0" in a table cellClosedKarsten Dambekalns2005-08-08

Actions
Actions #1

Updated by Michael Stucki over 19 years ago

I can confirm this. The attached patch fixes the problem.

Actions #2

Updated by Markus Walter over 19 years ago

Thanks for the fast patch, but applying this patch makes the headings of content-elements rendered any more.

Actions #3

Updated by Michael Stucki about 19 years ago

Are you sure this is a bug? Where does that happen? Can you send me the TS code that generates the headings?

Actions #4

Updated by Markus Walter about 19 years ago

I've tested the patch in two environements; always the same result: without the patch no "0" in the tables, with patch "0" but no headings of the content elements.
In the first setup I'm using css_styled_content with the default headings (so i didn't changed the TS) (Typo 3.8)
The second setup is the Testsite-Package (3.8). Perhaps you can reproduce it with this installation.

Actions #5

Updated by Michael Stucki about 19 years ago

I can reproduce this behavior and found the problem of it:

In content (default) and probably some other templates, the title is rendered depending on the value of the field "header_layout":

key {
field = header_layout
ifEmpty = 1
ifEmpty.override.data = register: defaultHeaderType
}

This means that if header_layout is not selected (empty), then the value is set to 1 or even (if it is set) to the value of "register: defaultHeaderType". Sounds more complicated than it actually is.

However, the problem is simple: If header_layout is not set, then the value is not "" but "0". This is a big difference and probably a wrong design of that template.

The best solution would in my opinion be to add a new property "ifNull" which fits better for selecting default keys. However this could affect many existing templates which are currently depending on that behavior.

TSref writes on ifEmpty:
if the content is empty (trimmed) at this point, the content is loaded with
"ifEmpty".
=> Zero's are an empty value. <=

Actions #6

Updated by Sebastian Widmann about 19 years ago

The patch is not working with TV, content-headers will not be shown?! The problem occurs after I changed the file. An undo shows the headers again.

Can somebody reproduce this?

Actions #7

Updated by Michael Stucki about 19 years ago

Did you read my last post? I'm quite sure it's the same problem, and it does not only affect the header_layout field but also many other cases where ifEmpty is used.

Actions #8

Updated by Michael Stucki over 18 years ago

Fixed in CVS.

Actions

Also available in: Atom PDF