Issue Bug Closed

#100124CObjectViewHelper throws warnings caused by uncatched optional arguments

Timo Pfeffer 03/09/23, 07:11 updated 07/09/24, 12:46

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

  1. Thomas Hohn changed category assigned to Thomas Hohn 03/09/23, 07:46

  2. Thomas Hohn commented 03/09/23, 07:48

    @tpf – Can you provide info on how to reproduce the error?

  3. 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 module

    expected behaviour:
    two new entries inside log module for each of the missing attributes.

  4. 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 = 1

    And

    [SYS][errorHandlerErrors] = 30466

    Doesnt trigger it at my site

  5. 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?

  6. 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
  7. 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.

  8. Georg Ringer commented and changed status New Needs Feedback 05/10/23, 07:51

    did you have time to take a look in your setup?

  9. 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.

  10. Simon Praetorius changed status Needs Feedback Resolved 06/16/23, 19:42

  11. Benni Mack changed status Resolved Closed 07/09/24, 12:46