Bug #32528
closedimageViewHelper should not throw exception
100%
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
Updated by Anja Leichsenring almost 12 years ago
- Project changed from 534 to 2559
- Category changed from 963 to Fluid: ViewHelpers
Updated by Alexander Opitz about 10 years ago
- Status changed from New to Needs Feedback
Hi,
was this issue fixed or does it still exists?
Updated by Riccardo De Contardi about 10 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.
Updated by Alexander Opitz about 10 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
Updated by Alexander Opitz almost 10 years ago
- Status changed from Needs Feedback to New
Updated by Christian Weiske over 9 years ago
If someone implements this, it would be nice to have the option what to do when the image cannot be found:
- Output no image tag
- Output an image tag with a "broken" image whose path can be customized, maybe via an attribute
- Throw exception
Updated by Michael Münch over 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.
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Helmut Hummel over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a3e48b1b368db95df08f852c17f928184da83724.
Updated by Tizian Schmidlin almost 9 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?