cancel
Showing results for 
Search instead for 
Did you mean: 

Logout issue

Former Member
0 Kudos

when i try to signout from my website, I get server error page. In console, i get WARN [hybrisHTTP20] [ContextInformationLoader] Cannot find CMSSite associated with current URL (https://localhost:9002/mystorefront/mysite/en)!

Please suggest.

Thank you, selvi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Selvi, let's start with how hybris determines the site for the request:

The CMSSiteFilter parses the URL and tries to find matching site based on urlPatterns property of CMSSite object; you can take a look at your sites and see which patterns are there

And you can see that there is no site matching the https://localhost:9002/mystorefront/mysite/en URL, which causes the error

However, if you add the ?site=electronics to the URL it will match one of B2C Electonics site patterns and everything works fine

In your case, the most simple solution is to add the 127.0.0.1 electronics.local entry to your hosts file and navigate to site not via "localhost:9002" but via "electronics.local:9002"

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Evgeny,

Thank you. I could solve the issue, By adding these two regex to my site: (?i)^https?://[^/]+(/[^?])?\?(.\&)?(site=$siteUid)(|\&.)$ (?i)^https?://[^/]$storefrontContextRoot((?![\?\&]site=).)*

Now, it works with localhost.

Former Member
0 Kudos

Selvi, do you have multiple sites or only one?

Former Member
0 Kudos

I have one site only.

Former Member
0 Kudos

Hi Selvi

Still I have this issue , can u help to resolve it , as you said in above I was adding regex in site.impex file , but I am not able to get it.

Please send me the full impex file how do you applied in your site.

Thanks Nagendra D