Project

General

Profile

Actions

Bug #104421

closed

SiteConfigurationLoadedEvent not fired in "form engine" context.

Added by Lars Peter Søndergaard 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-07-18
Due date:
% Done:

0%

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

Description

When opening the site config for editing there is a situation where the SiteConfigurationLoadedEvent is not fired.

Specifically, the \TYPO3\CMS\Backend\Form\FormDataProvider\SiteDatabaseEditRow uses \TYPO3\CMS\Core\Configuration\SiteConfiguration::load which loads the yaml file without the chance of processing it.

To explain my situation:

I tried to make the "settings" array in a site config editable from the site backend module.

For that my plan was to convert the nested ["settings"]["foo"]["bar"] into a flat version ["settings.foo.bar"] (and the reverse for storing, using SiteConfigurationBeforeWriteEvent - which works fine), and then simply use SiteConfiguation/Overrides with those flattened column names.

This works mostly, but the one place where it's actually needed, is when the form data provider uses the configuration to populate the databaseRow array for prefilling the stored values in the form fields.

I currently solved it by adding a custom form data provider right after the mentioned one above, and everything works as envisioned. But it would be nicer if I could use an event instead. If not the SiteConfigurationLoadedEvent, then maybe a separate one for similar intent.

Greetings

Actions

Also available in: Atom PDF