Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webspace manager uses request context params instead of request context service #7280

Open
stollr opened this issue Feb 13, 2024 · 0 comments
Labels
Bug Error or unexpected behavior of already existing functionality

Comments

@stollr
Copy link
Contributor

stollr commented Feb 13, 2024

Q A
Sulu Version 2.5
PHP Version doesn't matter
DB Version doesn't matter
Browser Version doesn't matter

Actual Behavior

The webspace manager, which is configured in the core bundle, relies on the request context container parameters router.request_context.host and router.request_context.scheme (see here) as fallback when no actual request object is available. This might happen during cache warming in a functional test.

But if the request context is configured by Symfony's framework.router.default_uri setting like it is described in their docs, the mentioned container parameters still uses the defaults (localhost and http). There is a issue which points this out symfony/symfony#53919.

In my case this leads to wrong url generation in a functional test (kernel test case) when the cache is warmed.

Expected Behavior

Sulu should use the request context values as fallback even if they are configured by the default_uri setting.

Possible Solutions

This can be fixed by using the request context service instead of the container params.

@stollr stollr added the Bug Error or unexpected behavior of already existing functionality label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant