Project

General

Profile

Actions

Bug #82767

closed

else if does not work as expected

Added by Anonymous about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-10-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Anonymous about 7 years ago

  • Description updated (diff)
Actions #2

Updated by Stephan Großberndt about 7 years ago

  • 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.

Actions #3

Updated by Anonymous about 7 years ago

  • Description updated (diff)
Actions #4

Updated by Anonymous about 7 years ago

  • 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>
Actions #5

Updated by Riccardo De Contardi about 7 years ago

  • Category changed from Tests to Fluid
  • Status changed from Needs Feedback to New
Actions #6

Updated by Anonymous about 7 years ago

Oh, seems I accidentally changed the category. The values are just some examples but not the real ones.

Actions #7

Updated by Wouter Wolters about 7 years ago

  • Status changed from New to Needs Feedback

Could you try to find the compiled template from the cache? And post the result here?

Actions #8

Updated by Anonymous about 7 years ago

Mh, I can not reproduce it anymore. Or is this just a bug in the Solr extension?

Actions #9

Updated by Wouter Wolters about 7 years ago

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?

Actions #10

Updated by Anonymous about 7 years ago

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.

Actions #11

Updated by Riccardo De Contardi about 7 years ago

  • 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

Actions

Also available in: Atom PDF