[TYPO3-english] COA always true when used in if.isTrue.cObject?

tcrass news at tcrass.de
Tue Mar 6 22:22:35 CET 2018


Dear all,

I've observed some -- at least: to me -- quite puzzling behavior in my 
Typo3 7.6 installation. Consider the following TypoScript:

lib.textWithContent = TEXT
lib.textWithContent.value = foo

lib.textWithoutContent = TEXT
lib.textWithoutContent.value =

lib.coaWithContent = COA_INT
lib.coaWithContent {
   10 = TEXT
   10.value = foo
}

lib.coaWithoutContent = COA_INT
lib.coaWithoutContent {
   10 = TEXT
   10.value =
}

page.10 = TEXT
page.10 {
   value = This should be visible (TEXT)...
   if.isTrue.cObject < lib.textWithContent
}

page.20 = TEXT
page.20 {
   value = This should be invisible (TEXT)...
   if.isTrue.cObject < lib.textWithoutContent
}

page.30 = TEXT
page.30 {
   value = This should be visible (COA)...
   if.isTrue.cObject < lib.coaWithContent
}

page.40 = TEXT
page.40 {
   value = This should be invisible (COA)...
   if.isTrue.cObject < lib.coaWithoutContent
}

I'd expect entries 20 and 40 of the page array to not show up in the 
rendered page, but alas! here's what I get:

This should be visible (TEXT)...This should be visible (COA)...This 
should be invisible (COA)...


Obviously, the empty COA object at lib.coaWithoutContent is considered 
being not-empty in page.40.if.isTrue.cObject < lib.coaWithoutContent.

Any explanation?

Cheers --

	Torsten


More information about the TYPO3-english mailing list