Project

General

Profile

Actions

Bug #91531

closed

Dashboard widgets registered using YAML cause exceptions if dashboard extension is not installed

Added by Felix Nagel almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Dashboard
Target version:
-
Start date:
2020-05-29
Due date:
% Done:

0%

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

Description

When implementing custom EXT:dashboard widgets into an extension using the YAML configuration in "/Configuration/Services.yaml" it is required that the dashboard extension is installed. If not, runtime exception will break the whole TYPO3 installation.

A possible workaround would be using PHP to register the widgets, but wouldn't it be great if YAML only is possible too?

Reference:
https://github.com/fnagel/t3extblog/issues/228
https://docs.typo3.org/c/typo3/cms-dashboard/10.4/en-us/Configuration/WidgetRegistration.html#services-php-file
https://twitter.com/felixnagel/status/1265662692603367428

Actions #1

Updated by Richard Haeser over 3 years ago

The Yaml way of configuring is the "easy" way. The downside of this is that you can't have conditions etc. As you are defining services based on classes that does not exist, this will break. And I don't know if you should want to have this different TBH.

So I would opt to use the PHP version of the service registration or add a dependency to the dashboard extension.

Actions #2

Updated by Richard Haeser over 3 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Richard Haeser about 3 years ago

  • Status changed from Needs Feedback to Closed

As this is how the Symfony Dependency Injection works, we will not change that. As you mentioned already, there is an example in the docs how to register widgets by the Services.php file.

I will close this issue for now. If you have another solution, please reach out in Slack so we can discuss if we should reopen this issue.

Actions

Also available in: Atom PDF