Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TYPO3 9.5: avoid throwing exeption on missing image

My TYPO3 9.5 installation throws the following exeption when an image is missing:

TYPO3Fluid\Fluid\Core\ViewHelper\Exception
Folder "/uploads/tx_owlslider/tosoh.gif/" does not exist.

TYPO3 8.7 did not do that.

I also tried this in TYPO3_CONTEXT "Production".

How could I avoid this error, especially in production environment ?

Thanks !

like image 870
Stefan Müller Avatar asked May 19 '26 09:05

Stefan Müller


1 Answers

Finally I fixed this in the Extension owl_slider itself. If the image is physically missing, the f:image - tag should not be rendered:

 <v:media.exists file="uploads/tx_owlslider/{item.itemimage}">
      <f:then>
         <f:image class="lazyOwl" src="uploads/tx_owlslider/{item.itemimage}" height="{settings.slideHeight}" alt="{item.itemname}"/>
      </f:then>
      <f:else>
          {item.itemname}
      </f:else>
</v:media.exists>
like image 103
Stefan Müller Avatar answered May 21 '26 23:05

Stefan Müller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!