Bug #36820

FLUIDTEMPLATE - Serialization of 'Closure' is not allowed

Added by Oliver Hader about 9 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Content Rendering
Target version:
Start date:
2012-05-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

A tricky one that was reported for the YAG extension as well.

What you need:

  • FLUIDTEMPLATE
  • COA_INT or USER_INT

Example:

page.20 = FLUIDTEMPLATE
page.20 {
  file = fileadmin/fluid.html
  partialRootPath = fileadmin/Partials/
}

page.30 = COA_INT
page.30.10 = TEXT
page.30.10.value = TEST

Contents of the Fluid Template file (fileadmin/fluid.html):

<f:render partial="Test" />

Contents of the Test partial (fileadmin/Partials/Test.html):

HELLO WORLD

Now, call the page (to have it cached) and then call another page that uses that cache - you should see a nice error/exception for handling the COA_INT.

Explanation:
  • The Partial handling in the RenderViewHelper will store a compiled version, using Closure in the cache
  • Thus, the first call works, but the second one, using the cache will use the Closure
  • The serialize($this->cObj) in COA_INT will stumble over the Closure deep down in cObj and fail

Closures have been introduced in Fluid with TYPO3 4.6.

#1

Updated by Oliver Hader about 9 years ago

  • Target version changed from 4.5.16 to 4.6.9
  • TYPO3 Version changed from 4.5 to 4.6
#2

Updated by Oliver Hader about 9 years ago

  • Status changed from New to Accepted
#3

Updated by Gerrit Code Review about 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10979

#4

Updated by Gerrit Code Review almost 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10979

#5

Updated by Gerrit Code Review almost 9 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10979

#6

Updated by Oliver Hader almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#7

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF