Bug #100124
closedCObjectViewHelper throws warnings caused by uncatched optional arguments
0%
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.
Updated by Thomas Hohn about 2 years ago
- Category set to Fluid
- Assignee set to Thomas Hohn
Updated by Thomas Hohn about 2 years ago
@Timo Pfeffer - Can you provide info on how to reproduce the error?
Updated by Timo Pfeffer about 2 years ago
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 module
expected behaviour:
two new entries inside log module for each of the missing attributes.
Updated by Thomas Hohn about 2 years ago
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 = 1
And
[SYS][errorHandlerErrors] = 30466
Doesnt trigger it at my site
Updated by Timo Pfeffer about 2 years ago
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?
Updated by Thomas Hohn about 2 years ago
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
Updated by Timo Pfeffer about 2 years ago
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.
Updated by Georg Ringer almost 2 years ago
- Status changed from New to Needs Feedback
did you have time to take a look in your setup?
Updated by Timo Pfeffer almost 2 years ago
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.
Updated by Simon Praetorius almost 2 years ago
- Status changed from Needs Feedback to Resolved