Issue Bug Closed

#99267Call to a member function getOption() on null in TYPO3 12.0.0

Alex Kellner 12/04/22, 20:03 updated 12/21/22, 08:09

Description

I’m not sure if I missed a breaking change to define a TypeNum with an extbase action, but opening the frontend with the defined TypeNum leads to

Call to a member function getOption() on null
in .../vendor/typo3/cms-backend/Classes/View/BackendViewFactory.php line 59

The definition in TypoScript is:

luxletterPreviewNewsletter = PAGE
luxletterPreviewNewsletter {
  typeNum = 1560777975
  config {
    disableAllHeaderCode = 1
    disablePrefixComment = 1
    xhtml_cleaning = 0
    admPanel = 0
    debug = 0
  }

  10 = USER_INT
  10 {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    extensionName = Luxletter
    pluginName = Fe
    vendorName = In2code
    controller = Frontend
    action = preview
    switchableControllerActions.Frontend.1 = preview
    features.requireCHashArgumentForActionArguments = 0
  }
}

There is no difference if I define the typeNum in site configuration or if I simply add &type=1560777975
Any hints what’s missing?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 4

  1. Georg Ringer commented and changed status New Needs Feedback 12/05/22, 07:14

    I don’t know why the backendviewfactory is called if this is actually a frontend plugin. the error must be there somewhere.

    maybe it has to do with your code still depending on switchableControllerActions as this does not work anymore?

    btw also requireCHashArgumentForActionArguments can be dropped as this has been removed

  2. Alex Kellner commented 12/05/22, 10:20

    I tested with a smaller TypoScript, but the error still occurs:

    testFoo = PAGE
    testFoo {
        typeNum = 123456789
    
        10 = USER_INT
        10 {
            userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
            extensionName = Luxletter
            pluginName = Fe
            vendorName = In2code
            controller = Frontend
            action = preview
        }
    }

    I’m also wondering about a backend routes issue here.

    BTW: This TypoScript works as expected:

    testFoo = PAGE
    testFoo {
        typeNum = 123456789
    
        10 = COA_INT
        10.10 = TEXT
        10.10.value = HW
    }
  3. Alex Kellner commented 12/06/22, 18:36

    This issue can be closed. Following the backtrace leads to an issue in my Controller file.
    Source: $this->moduleTemplate can not be generated in initializeAction() if there are also normal extbase actions mixed with AJAX actions (actions that are initialized via TypoScript bootstrap)

  4. Benni Mack changed status Needs Feedback Closed 12/21/22, 08:09