Task #57822
Enabled content cache and uncached prototype throwing exception
Status: | Resolved | Start date: | 2014-04-11 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | 1.1 |
Description
prototype(PIPEU.Site:SimpleBasket) < prototype(TYPO3.TypoScript:Template)
prototype(PIPEU.Site:SimpleBasket) {
templatePath = 'resource://PIPEU.Site/Private/Templates/TypoScriptObjects/SimpleBasket.html'
partialRootPath = 'resource://PIPEU.Site/Private/Partials'
basketNode = ${q(site).find('basket').get(0)}
@cache {
mode = 'uncached'
context {
1 = 'documentNode'
}
}
}
its used like this:
page{
parts{
simpleBasket = PIPEU.Site:SimpleBasket
}
}
Exception:
Uncaught exception #1332491864 in line 195 of /Users/pumatertion/Sites/neos.pipeu/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Eel_FlowQuery_FlowQuery.php: No operation which satisfies the runtime constraints found for "find".
History
#1 Updated by Carsten Bleicker over 1 year ago
Sorry, missing pre tag for codesnippets :(
prototype(PIPEU.Site:SimpleBasket) < prototype(TYPO3.TypoScript:Template) prototype(PIPEU.Site:SimpleBasket) { templatePath = 'resource://PIPEU.Site/Private/Templates/TypoScriptObjects/SimpleBasket.html' partialRootPath = 'resource://PIPEU.Site/Private/Partials' basketNode = ${q(site).find('basket').get(0)} @cache { mode = 'uncached' context { 1 = 'documentNode' } } } page{ parts{ simpleBasket = PIPEU.Site:SimpleBasket } }
#2 Updated by Carsten Bleicker over 1 year ago
You can close this ticket.
Its solved with this settings:
prototype(PIPEU.Site:SimpleBasket) < prototype(TYPO3.TypoScript:Template) prototype(PIPEU.Site:SimpleBasket) { templatePath = 'resource://PIPEU.Site/Private/Templates/TypoScriptObjects/SimpleBasket.html' partialRootPath = 'resource://PIPEU.Site/Private/Partials' basketNode = ${q(site).find('basket').get(0)} @cache { mode = 'uncached' context { 1 = 'site' 2 = 'documentNode' } } }
#3 Updated by Christian Müller over 1 year ago
- Status changed from New to Resolved
The "context" configuration inside @cache needs to contain all context variables that are needed to render this TypoScript object. "site" is used but was not included.
#4 Updated by Carsten Bleicker over 1 year ago
Just to be sure,
i have to make sure by myself wich context varialbles also the inherited by extending another prototype?
maybe a wired example but in theory:
prototype(MY:FOO) < prototype(TYPO3.Neos:Breadcrumb) prototype(MY:FOO){ @cache { mode = 'uncached' context { # This one because its used in the Breadcrumb? 1 = 'node' } } }