Project

General

Profile

Actions

Task #99655

open

Backend: Set correct Site in site attribute of request when the current request has sufficient contextual information

Added by Philipp Wrann almost 2 years ago. Updated almost 2 years ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2023-01-20
Due date:
% Done:

0%

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

Description

With the introduction of the site-config we added more and more multisite-specific features, that are configured in the site-config.

This works perfectly for the frontend. But when you rely on the site-config in the backend, you will need to add a middleware, that sets an internal site attribute for various backend routes. Otherwise you will often just have a NullSite, which is useless.

An example would be: You implement an api and each site has its own credentials because the site should only have access to a subset of data. So you configure the credentials in the site-config. But if you need to add some backend-features, that needs those credentials, you will often need to determine the rootpage by grabbing some id from the current queryParams and then retrieving the site-config from the rootpage id.

In my opinnion the site-config should be available whenever possible.

for example - it is possible to determine the site and set it as attribute when:

- you edit the site config itself
- you edit any tca record located inside the page-tree
- on any view you have relation to a page uid

At the moment i need to add a middleware for each extension, that makes extensive use of the site configuration.

Unfortunately i did not test the behaviour in V11, so i need to tag the typo3 version to 10. Once i can confirm this still exists in V11/V12, i can update this issue.

Update

This is still valid for V11/V12.

Actions

Also available in: Atom PDF