#100124CObjectViewHelper throws warnings caused by uncatched optional arguments
Description
The registered arguments “currentValueKey” and “table” of CObjectViewHelper are defined as optional, but the code inside renderStatic does not check if these two arguments are existing. Instead it just uses these two args, which causes warnings inside log module.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 11
-
Thomas Hohn changed category assigned to Thomas Hohn 03/09/23, 07:46
-
Thomas Hohn commented 03/09/23, 07:48
-
Timo Pfeffer commented 03/09/23, 08:38
Steps to reproduce:
1) Configure $GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘errorHandlerErrors’] to handle warnings too
2) use f:cObject inside Fluid template without defining the described attributes
3) call “the template” in browser and look into the log moduleexpected behaviour:
two new entries inside log module for each of the missing attributes. -
Thomas Hohn commented 03/09/23, 08:52
Hi – tried with
page = PAGE page.10 = FLUIDTEMPLATE page.10 { template = TEXT template.value = <f:cObject typoscriptObjectPath="lib.test" data="foo"/> } lib.test = TEXT lib.test.current = 1And
[SYS][errorHandlerErrors] = 30466
Doesnt trigger it at my site
-
Timo Pfeffer commented 03/09/23, 14:58
Hmm the page of us is full of these warnings.
Is it ensured that optional arguments are filled in $arguments too, although these are not defined in fluid? -
Thomas Hohn commented 03/10/23, 08:48
Hi @tpf
My output looks like:
/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php:139: array (size=4) 'data' => string 'foo' (length=3) 'typoscriptObjectPath' => string 'lib.test' (length=8) 'currentValueKey' => null 'table' => string '' (length=0)
With the following TS config:
lib.test = TEXT lib.test.current = 1
-
Timo Pfeffer commented 03/10/23, 10:48
Okay then it must be a problem with the current website implementation. I will check it. Perhaps it has been something in common with the temporary fix of another forge ticket of mine, but not sure.
Please leave it open, i will check it in the next hours/days. -
Georg Ringer commented and changed status
NewNeeds Feedback 05/10/23, 07:51did you have time to take a look in your setup?
-
Timo Pfeffer commented 05/10/23, 08:18
yes I have checked it and have solved it, but forget to write it down here. Sadly i don’t know anymore what exactly fixed this behaviour. So you can close this ticket.
-
Simon Praetorius changed status
Needs FeedbackResolved 06/16/23, 19:42 -
Benni Mack changed status
ResolvedClosed 07/09/24, 12:46
@tpf – Can you provide info on how to reproduce the error?