Bug #9114

TemplateView - still using $viewData instead of $variables - error "Context has to be initialized with an array, NULL given."

Added by Stefan Neufeind about 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-08-02
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:View
Target version:-
Has patch: Affected Flow version:

Description

Error-message is: Context has to be initialized with an array, NULL given.

This is a follow-up to the resolved bug #7053 (filed against extbase). They share in common that initialisation was not done, but the root-cause is different!

With TYPO3 v4.3.3 in sysext/extbase/Classes/MVC/View/AbstractView.php there was an initialisation of viewData to array(). With TYPO3 v4.3.4 this was renamed from viewData to variables (inside AbstractView).

However TemplateView distributed with TYPO3 v4.3.4 still relies on viewData.

Fix: Renaming this to variables makes it work again.

protected function buildRenderingContext($variableContainer = NULL) {
if ($variableContainer === NULL) {
$variableContainer = $this->objectFactory->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', $this->variables);

History

#1 Updated by Bastian Waidelich about 5 years ago

  • Category set to View
  • Branch set to v4

#2 Updated by Sebastian Kurfuerst about 5 years ago

  • Status changed from New to Resolved

Hey,

this has been already resolved in SVN and will be resolved with the next release coming tomorrow.

http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-July/005986.html

Greets,
Sebastian

#3 Updated by Stefan Neufeind about 5 years ago

argh But thank you for mentioning that.

Maybe an email to typo3-announce would have been a good idea then, since that might have been what made people upgrade to 4.3.4 "as soon as possible" (security-update), and maybe made them trap into the problem needing to either debug it or rollback to 4.3.3 and live on "the wild side of life" (insecure) for some more days.
I can only guess this wasn't done since 4.3.x is considered "deprecated" anyhow. But it's still in service, and some people might not be able to do the 4.4.x-move right away.

Kind regards,
Stefan

Also available in: Atom PDF