Project

General

Profile

Actions

Bug #104421

closed

SiteConfigurationLoadedEvent not fired in "form engine" context.

Added by Lars Peter Søndergaard 9 days ago. Updated 4 days 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 #1

Updated by Georg Ringer 4 days ago

  • Status changed from New to Closed

Hey!

thanks for creating the issue and also for providing a possible solution which works for you.

For v13 we plan to have a custom module for the settings, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/84342 for the Proof of concept. As we don't want to change the way in v12 I am however still closing the issue.

if you don't agree, feel free to contact me via slack to discuss it

Actions

Also available in: Atom PDF