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

Get wrong URLs with "path" function in twig #134

Open
Quehnie opened this issue Sep 14, 2020 · 1 comment
Open

Get wrong URLs with "path" function in twig #134

Quehnie opened this issue Sep 14, 2020 · 1 comment

Comments

@Quehnie
Copy link

Quehnie commented Sep 14, 2020

Q A
Bug? yes
New Feature? no
Community Bundle Version develop#73011f99e73fdd540e4b91175d52032253994743
Sulu Version master#96096d163f29679215845f3877fa67da33f377ef

Actual Behavior

if in dev environment path('sulu_community') = /de/login
when changed into stage env path('sulu_community') = /login
so it creates a redirect and lose my post data.
both webspaces environments are with /{localization} and the route include is type portal.

Expected Behavior

in both environments it will prefix the language.

Steps to Reproduce

Install sulu and change env, just look at the action of the login form.

Possible Solutions

I fixed it by removing type portal and add prefix: /{_locale}

@niklasnatter
Copy link
Contributor

niklasnatter commented Sep 25, 2020

I think we need to pass the prefix of the current portal to the path() function. Have not tested it, but that should look something like this:

path('sulu_community.login', {prefix: app.request.attributes.get('_sulu').getAttribute('portalInformation').getPrefix()})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants