Bug #21976 Clarification Requested

3.4.0 - File tag pair misbehaving when no content

Version: 3.3.4 Reporter: Rob Allen

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

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?

  • 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}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases