Project

General

Profile

Actions

Bug #32528

closed

imageViewHelper should not throw exception

Added by Peter Niederlag over 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2011-12-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hey guys,

we don't like the imageViewHelper to throw exceptions if an image is not found. it should behave like the underlying cObj::getImgResource() and just don't do anything.

regards, foertel, pniederlag


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #72042: Backport Catching of Exception in ImageViewhelper to 6.2.XClosed2015-12-03

Actions
Actions #1

Updated by Anja Leichsenring about 11 years ago

  • Project changed from 534 to 2559
  • Category changed from 963 to Fluid: ViewHelpers
Actions #2

Updated by Alexander Opitz over 9 years ago

  • Status changed from New to Needs Feedback

Hi,

was this issue fixed or does it still exists?

Actions #3

Updated by Riccardo De Contardi over 9 years ago

It still exists in TYPO3 6.2.6

Test:
1. upload the image 539.png into /fileadmin/Images/
2. add somewhere in the page template /partial: <f:image src="fileadmin/Images/539.png" />
3. the image is shown
4. delete the image
5. refresh page - the following error is shown:

Oops, an error occurred!

File /Images/539.png/ does not exist.

More information regarding this error might be available online.
Actions #4

Updated by Alexander Opitz over 9 years ago

  • Project changed from 2559 to TYPO3 Core
  • Category changed from Fluid: ViewHelpers to Fluid
  • TYPO3 Version set to 6.2
  • Is Regression set to No
Actions #5

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to New
Actions #6

Updated by Christian Weiske about 9 years ago

If someone implements this, it would be nice to have the option what to do when the image cannot be found:

  1. Output no image tag
  2. Output an image tag with a "broken" image whose path can be customized, maybe via an attribute
  3. Throw exception
Actions #7

Updated by Michael Münch about 9 years ago

The Viewhelper should never throw any exceptions for invalid or non existing files cause this is not an breaking error which could result in invalid code execution.
Instead log the error to the system log and just output an empty string or dummy image so developers can track the error and customers / users can use the page as it is instead of seeing an "Oops an error occured".

While exceptions are fine during development and to protect pieces of the core from running into undefined states - they are not meant to be used as simple hints to the end user of the website.

If someone can link me some instructions on how to create an patch - i'll try to share our "Bugfix" which we added to our core which simply adds an try / catch Block around some pieces und catch the exception for further processing.

Actions #8

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40212

Actions #9

Updated by Gerrit Code Review almost 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40212

Actions #10

Updated by Gerrit Code Review almost 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40212

Actions #11

Updated by Gerrit Code Review almost 9 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40212

Actions #12

Updated by Helmut Hummel almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Tizian Schmidlin over 8 years ago

Hey guys,

this is still not implemented in TYPO3 6.2.16, would it be possible to include this in the next 6.2.17?

Actions #14

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF