Project

General

Profile

Actions

Bug #101928

open

f:image(.uri) and other FAL/File ViewHelpers should never raise an Exception for missing files!

Added by Gabriel Kaufmann / Typoworx NewMedia 8 months ago. Updated 8 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-09-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

For some reason the Core-Team still thinks it's a "good practice" to break the whole site if there's just a simple problem about a missing file for an image or file-ViewHelper.

I did't care about that by overriding that with my custom ViewHelper catching such issues and handling them in a more useful and end-user friendly way. But this isn't possible anymore as those ViewHelpers are now final class and the logic inside isn't outsourced into a PHP-Trait that could be re-used by other developers that want to take care of this more senseful.

So please implement:
- possibility to render an optional fallback (placeholder?!) image.
- possibility to disable raising an exception (this should be the default if the site is even without f.e. file/image is useable)
- possibility to send a Signal/Event for FAL/Files missing with data for the file/fal object to give users the ability to handle such behavour.

When I've been reading about Fluid ViewHelpers will be declared final in v12 [https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.5/Important-95298-FluidViewhelpersWillBeDeclaredFinalInV12.html] I thought the core-team would to this by using best-practices like using an Abstract-Class or Trait implementing the main logic. But now it's only possible to implement custom handling by doing a full-implementation or 1:1 copy if original core ViewHelpers which leads to none-upgradeable functionalities for core-changes.

Related to:
#101927


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #101929: ViewHelperInvoker should catch Exceptions allow the Site-Developer to handle or supress exceptionsNew2023-09-15

Actions
Related to TYPO3 Core - Task #95298: ViewHelpers will be declared final in v12Closed2021-09-21

Actions
Actions

Also available in: Atom PDF