Bug #82767
closed
else if does not work as expected
Added by Anonymous about 7 years ago.
Updated about 7 years ago.
Description
In one of our latest projects I've used the else if of the if viewhelper in our site extension in one of the partials which override a partial of an installed extension.
The first page load shows the desired result. But every subsequent call shows the original template not the overriden template from our site extension.
The only working solution was to use a switch statement with the needed cases.
TYPO 3 LTS 8.7.7
Fluid 2.4.0
PHP 7.1.x
It looks like some cache related issue.
- Description updated (diff)
- Status changed from New to Needs Feedback
please provide code and information about the exact template partial structure here as the currently given information is not enough to reproduce it.
- Description updated (diff)
- Category changed from Fluid to Tests
It happened in the tt_address extension. I'm not yet sure if the problem is in the extension or Fluid.
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers">
<f:section name="Document">
<div class="results-entry"
<f:if condition="{document.type} == 'address'">
<f:then>
// other code'
</f:then>
<f:else if="{document.type} == 'page'">
// other code'
</f:else>
<f:else if="{document.type} == 'solrfile'">
// other code'
</f:else>
</f:if>
</div>
</f:section>
- Category changed from Tests to Fluid
- Status changed from Needs Feedback to New
Oh, seems I accidentally changed the category. The values are just some examples but not the real ones.
- Status changed from New to Needs Feedback
Could you try to find the compiled template from the cache? And post the result here?
Mh, I can not reproduce it anymore. Or is this just a bug in the Solr extension?
I really don't know. I asked the maintainer of the standalone Fluid of TYPO3 and he could not think of a possible bug in the viewhelper itself.
Can I close this issue as not reproduceable anymore?
Ok, then let's close this one and we'll keep an eye on this, maybe it was just a short regression bug which is already fixed now.
- Status changed from Needs Feedback to Closed
@Daniel Hinderink Ruf thank you for your feedback; I close this issue for now. Feel free to reopen it (or open a new issue with a reference to this one) if the issue comes out again or you have more information about how to reproduce it.
Best Regards
Riccardo De Contardi
Also available in: Atom
PDF