Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
None
-
None
Description
DefaultRouter fails to create proper URL because of str_replace.
When you try to generate URL (ie. Twig: url('some.route')) that is SiteAccess aware it will generate incorrect URL if:
- URIElement: 1 matcher is used (and probably any other URI related matcher) and
- route path is same as beginning of the host, ie:
# Hostname: ezplatform.com # SiteAccess: example # routing.yml: some.route: path: /ezplatform
Expected URL: http://ezplatform.com/example/ezplatform
Result URL: http://example/ezplatform.com/example/ezplatform
Explanation: It tries to replace any occurence of /ezplatform with /example/ezplatform in base URL: http://ezplatform.com/ezplatform.
(If you try to generate route with path: /, it will replace every slash in URL with SiteAccess name, ie: http:/example//example/ezplatform.com/example/)
Edit: Probably duplicate of: https://jira.ez.no/browse/EZP-28099 (Seems similar, put probably different issue)