Actions
Bug #36820
closedFLUIDTEMPLATE - Serialization of 'Closure' is not allowed
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.
Actions