Project

General

Profile

Actions

Bug #17197

closed

doNotLinkIt (in TMENU's states (e.g. CUR) with special set to "rootline") is integer, not boolean

Added by Neike Taika-Tessaro about 17 years ago. Updated almost 14 years ago.

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

0%

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

Description

Note the template TypoScript in "Steps to Reproduce". The TypoScript makes a breadcrumb trail, but the current element (whilst it is affected by things such as .linkWrap changing, and thus definitely being displayed), will always be linked regardless of doNotLinkIt's setting.

The solution was to set doNotLinkIt to "1", and not "true". Hence, this is an error in the documentation (which claims the type to be boolean), rather than an actual lack of functionality.

Note, for comparison, that TMENU's expAll attribute is also boolean - here, using "true" has the desired effect, as one would expect. I thus assume one of the two (TMENU.expAll's interpretation of "boolean" vs. TMENUITEM.doNotLinkIt's interpretation of "boolean") is incorrect.

[...]
BREADCRUMBS = HMENU
BREADCRUMBS {
wrap = |<br /><br />
special = rootline
special.range = 1|-1
1 = TMENU
1 {
NO = 1
NO.linkWrap = | » |*|  | » |*|  |
NO.ATagParams = class="breadcrumb"
CUR = 1
CUR.linkWrap = | » |*|  | » |*|  |
CUR.doNotLinkIt = true
CUR.allWrap = <span class="breadcrumb"> | </span>
}
}
[...]

Note about the PHP version: it is 4.4.4, not 4.3.
(issue imported from #M5389)

Actions #1

Updated by Neike Taika-Tessaro almost 17 years ago

I've finally had the opportunity to test this 'thoroughly'. It's actually just a question of strictness. TypoScript's boolean, I reckon, is defined as 1 (for true) or 0 (for false). But TS itself also accepts other values (obviously). So it's up to the routine / plug-in to interpret it... and where doNotLinkIt only accepts 1 and 0 (and defaults to 0), expAll accepts a string as true, too (probably via a typecast).

Since both act fine with the 1 and 0 variant, someone can close this bug report as "resolved" (and, in fact, smack me across the head for the oversight, come to mention it).

Still, this was oddly confusing. Even PHP supports the keywords "true" and "false". Maybe the coding guidelines can be expanded to include strict evaluation, so these things can be circumvented. As it is, "boolean" isn't consistently implemented (though it's probably fine in most cases), even within the core itself.

(The Typo3 version I tested this on is 4.1.1.)

Actions #2

Updated by Chris topher almost 14 years ago

Without smacking someone across the head: I don't think that TypoScript officially understands TRUE/FALSE. Use 1 or 0 instead.

Actions

Also available in: Atom PDF