Bug #21976 Clarification Requested

3.4.0 - File tag pair misbehaving when no content

Version: 3.3.4 Reporter: Rob (bluedreamer)

Pre 3.4.0 the following worked (file field inside a grid), if no file nothing would be outputted:

{news_extended}

    {news_extended:image} 
 <figure>
   {url:medium}
   <figcaption>{description}</figcaption>
        </figure>
    {/news_extended:image}

{/news_extended}

With 3.4.0 that now outputs empty tags when previously it outputted nothing - not expected behaviour?

  • For some reason the code parser stripped out my IMG tag in the code example smile

    Rob (bluedreamer)
    28th July, 2016 at 7:12am
  • I can replicate this bug.

    Derek Hogue
    29th July, 2016 at 3:09pm
  • Are you still running into any issues with this one? I just tried to replicate and can’t in 3.5.10. While I don’t see this exact issue in the changelog, I suspect it’s been fixed.

    Robin Sowell
    18th July, 2017 at 12:04pm
  • Hi Robin

    Not seen this one recently so probably fixed - thanks!

    Rob (bluedreamer)
    18th July, 2017 at 1:46pm
  • Thanks for the confirmation! I always worry I missed some nuance when testing the more complex fields!

    Robin Sowell
    18th July, 2017 at 3:00pm

You must be signed in to comment on a bug report.

  • You can get around it by wrapping the file tag in a conditional, but seems a bit excessive:

    {if news_extended:image} 
        {news_extended:image} 
     <figure>
       {url:medium}
       <figcaption>{description}</figcaption>
            </figure>
        {/news_extended:image}
    {/if}

ExpressionEngine News

#eecms, #events, #releases