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 about 1 year ago. Updated 4 months ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2023-09-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
exceptions
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 (0 open2 closed)

Related to TYPO3 Core - Bug #101929: ViewHelperInvoker should catch Exceptions allow the Site-Developer to handle or supress exceptionsClosed2023-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