"Closing tag matches nothing" with TYPO3 Fluid inline syntax in HTML

Hi PhpStorm community!

As many TYPO3 developers use PhpStorm I finally took the time to evaluate it - and I really like it. But I have huge problems using TYPO3 Fluid inline syntax (see TYPO3 Forge and TYPO3 Flow Documentation) in HTML files. In bigger Fluid template files sometimes code folding leads to a state where most of the code can't be expanded because PhpStorm does not recognize tags with Fluid inline syntax (curly braces). Hava a look at this minimal example:

<div xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">

  <f:if condition="">


      <!-- something more -->




Fluid template files and partials are saved with .html file extensions and thus PhpStorm treats them as HTML.

If I collpase line 2 (<f:if...>) the code is folded as expected. But if I try to unfold it again, the code is even more collapsed to:

<div xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"...>



The only way to unfold it again is either "unfold all" or unfold the root element and change the first </div> tag.

Bootstrap heavily uses custom html attributes. Using them in combination with fluid leads to my problem. Example: The data-ride="carousel" attribute is used to mark a Bootstrap Carousel as animating starting at page load. In Fluid I'd use something like...

<div id="foo"{f:if(condition:'{foo}', then:' data-ride="carousel"')}>

  <!-- more carousel code -->


...to optionally add this attibute. Without fluid shorthand syntax it would be...

<f:if condition="{foo}">


    <div id="foo" data-ride="carousel">



    <div id="foo">



  <!-- more carousel code -->


Using shorthand syntax I got the "Closing tag matches nothing" error and collapsing issue because of the curly braces. Using normal fluid syntax the whole structure is "invalid" and much more errors are thrown (duplicate id, unclodes div, etc.).

So what is the best way to edit TYPO3 fluid template files in PhpStorm? Is there a way to tell PhpStorm to ignore the curly braces and its content in html/xml tags?

Comment actions Permalink

No way, sorry:( Please vote for http://youtrack.jetbrains.com/issue/WI-7895 (fluid support)

Comment actions Permalink

Thanks! I already voted for this issue on 2014-02-08 but added a comment.


Please sign in to leave a comment.