Review main Abandoned

55928[BUGFIX] Set content object for ConfigurationManager of FLUIDTEMPLATE

Manuel Selbach CR 0 V 0 Easy +11 −0 updated 03/07/18, 22:17

Commit message

The content object has to be set for
TYPO3\CMS\Extbase\Configuration\ConfigurationManager as this behavior
was previously done by TYPO3\CMS\Fluid\View\StandaloneView::construct
which was called by TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::render
but with the change https://github.com/TYPO3/TYPO3.CMS/commit/5c048a4c8017e4d50ab5f2343970a0fd33e4aaed
the running order has changed and so the content object is not set for
the ConfigurationManager this will result in an exception (Call to a
member function getTreeList() on null) as
TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::getRecursiveStoragePids
tries to execute this method on the content object, which is not present.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 911

  1. Manuel Selbach uploaded patch set 1 02/27/18, 17:32

  2. TYPO3com voted on patch set 1 V -1 02/27/18, 17:42 Completed build in 09m 13s on Tue, 27 Feb, 06:42 PM Test Summary: 2 of 31032 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-20234

  3. Manuel Selbach uploaded patch set 2 02/27/18, 19:37

  4. TYPO3com voted on patch set 2 V +1 02/27/18, 19:46 Completed build in 09m 31s on Tue, 27 Feb, 08:46 PM Test Summary: 30880 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-20240

  5. Benjamin Franzke commented on patch set 2 02/27/18, 21:27

    Using extbase ConfigurationManagerInterface::getConfiguration() in a DataProcessor is bad practice IMO (although I agree that it's a pity that the bugfix broke those usages). The DataProcessors do not run through extbase Bootstrap so there's no global extbase state that they can rely on. This patch adds another (kinda ugly workaround) on top of the previous workaround which fixed a (still open) bug in fluid. I would actually prefer to revert the previous BUGFIX, IF we get https://github.com/TYPO3/Fluid/pull/342 merged (and released as bugfix). That pull request fixes the actual fluid bug, that made the previous BUGFIX necessary.

    FluidTemplateContentObject.php:92

    That's more functional change here. If I see things right, the StandaloneView constructor _always_ sets a new ContentObjectRenderer (not only if FLUIDTEMPLATE is a parent, as this line does).

    FluidTemplateContentObject.php:122 Unresolved

    Standaloneview creates a clean ContentObjectRenderer – not sure we should inject the FLUIDTEMPLATE cObj in a BUGIX (functional change)
  6. Benjamin Franzke commented on patch set 2 CR -1 03/05/18, 17:02

    I asked Claus Due whether https://github.com/TYPO3/Fluid/pull/342 will be included in the next fluid bugfix release. He said that he plans to do that. Therefore we should wait for that release and revert the other patch then.
  7. Claus Due commented on patch set 2 CR -1 03/06/18, 13:20

    Should work, just the nit-picking to make it perfect

    FluidTemplateContentObject.php:92 Reply Unresolved

    If you move this a bit further down you don't need the condition checking if $this->view === null

    FluidTemplateContentObject.php:121

    You may want to load ConfigurationManagerInterface instead of the implementation
  8. Claus Due commented on patch set 2 03/06/18, 13:26

    This should be fitted with a unit test: the tests currently work because of the condition (see comment in code) - so the addition isn't tested at all. Removing the condition and adding the test would make this perfect.
  9. Benjamin Franzke commented on patch set 2 03/07/18, 12:20

    The fluid bug has been fixed in 2.5.2. I've therefore created https://review.typo3.org/c/56035/ as an alternative fix. Manuel, please test (it's imported to test that one together with fluid 2.5.2).
  10. Manuel Selbach commented on patch set 2 03/07/18, 21:58

    Please find my test result in https://review.typo3.org/#/c/56035/
  11. Christian Kuhn abandoned the change 03/07/18, 22:17