Sulu: Portal route cannot be used for security yml

Created on 23 Aug 2016  路  7Comments  路  Source: sulu/sulu

| Q | A |
| --- | --- |
| Bug? | yes |
| New Feature? | no |
| Sulu Version | 1.3.0 |
| Browser Version | Browser name and version |

Actual Behavior

When use e.g. sulu_community.login in security.yml as login url.

Expected Behavior

The RequestListener need to be called before security try to generate the route:

https://github.com/sulu/sulu/blob/1.4.6/src/Sulu/Bundle/WebsiteBundle/Routing/RequestListener.php#L45-L56

Bug Needs Information

All 7 comments

@alexander-schranz What exactly are you trying to say here? I can't really follow...

@danrot you can currently not use sulu_community.login in the security.yml on the website because the RequestListener (link now fixed: https://github.com/sulu/sulu/blob/1.4.6/src/Sulu/Bundle/WebsiteBundle/Routing/RequestListener.php#L45-L56) is not called before. If possible the RequestListener should be called before so the prefix and host ist set on the context which is needed to generate the url for type: portal routes.

Thought so, but the title was misleading 馃槈

Does the following exception also apply to this bug when I want to secure a portal route with the CommunityBundle? Does anyone have tips on a fix?

Some mandatory parameters are missing ("host", "prefix") to generate a URL for route "sulu_community.login".

https://github.com/sulu/SuluCommunityBundle/blob/develop/Resources/doc/2-setup-webspace.md#enable-security

@codebarista thats this bug here. sorry for the not working example in the sulu community. Please replace it with:

            form_login:
                login_path: /login
                check_path: /login
            logout:
                path: /logout
                target: /

@alexander-schranz This sounds like an easy change, why haven't we done it already? Or is that already fixed in some other way, and we can close this issue?

@danrot not sure why we didn't change the priority yet 馃檲 . maybe because we also needed to change the priority where the Portalinformation is set on the request but still think we should do it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HadGS picture HadGS  路  6Comments

sagikazarmark picture sagikazarmark  路  8Comments

DavideTriso picture DavideTriso  路  7Comments

saphrus picture saphrus  路  4Comments

alexander-schranz picture alexander-schranz  路  4Comments