on 01-28-2015 7:44 AM
Hi Apoorv,
You can choose either of the below mentioned solution to fix this:
Do host entry and use electronics.local:9001 instead of localhost:9001
OR import following impex if you wish to continue with localhost:9001
;electronics;(?i)^https?://localhost(:[\d]+)?./electronics/.$;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Indrajeet,
I too facing the similar problem. I tried with 2 option ie impex approach. After clicking on "sign out" I am able to sign out. Bu the page is in the same location , it is not redirecting to home page which will generally happens. For Eg: If I am in PDP(Product Details Page) page and clicked on "sign out" I am not going to home page of my site instead I am in the PDP page only. Please guide me how to reach to home page.
Thanks, Subbu.
The URL Pattern of the site is localhost:9001/electronicsstorefront?site=electronics
The hybris version is 5.1. (Cannot upgrade to 5.3)
Have made no customization to the code generated by default from storefront.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apoorv,
Please share the following information to find the root cause of the issue: 1) URL pattern of the website 2) Hybris Version 3) Any customizations - code, configuration in properties files etc.
Thanks IK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ideally after logout, if the parameters are ?logout=true, then "if(logout)" should be called. But it is not getting called and generating a "HTTP Status 500 - Cannot find CMSSite associated with current URL"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The homepage controller is not getting called when I navigate to some other page and give logout. And hence, it throws error.
@RequestMapping("/")
public class HomePageController extends AbstractPageController
{
@RequestMapping(method = RequestMethod.GET)
public String home(@RequestParam(value = "logout", defaultValue = "false") final boolean logout, final Model model,
final RedirectAttributes redirectModel) throws CMSItemNotFoundException
{ if (logout)
{
GlobalMessages.addFlashMessage(redirectModel, GlobalMessages.INFO_MESSAGES_HOLDER, "account.confirmation.signout.title");
return REDIRECT_PREFIX + ROOT;
}
storeCmsPageInModel(model, getContentPageForLabelOrId(null));
setUpMetaDataForContentPage(model, getContentPageForLabelOrId(null));
updatePageTitle(model, getContentPageForLabelOrId(null));
return getViewForPage(model);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, when I logout after navigating from homepage and logout i not working, the url after logout is https://localhost:9002/yacceleratorstorefront/electronics/en/?logout=true --and throws "HTTP Status 500 - Cannot find CMSSite associated with current URL"
But when I logout immediately after login and the logout is working, the url after logout is http://localhost:9001/yacceleratorstorefront/electronics/en/?site=electronics
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Luke! The issue is that if I login and logout immediately from the homepage, then it works fine. But if I navigate to any other page and then logout, I get the error as "HTTP Status 500 - Cannot find CMSSite associated with current URL"
Also, the above solution is also not working for me.
Is it a bug in the b2c accelerator store front as I have not modified anything and still it is not working?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can change the spring-security*.xml file so modify the logout redirect url so that it points to home page of b2c storefront, i.e. "/yacceleratorstorefront/?site=apparel-uk"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apoorv,
I seen your Answer on the other Logout Page Error question, where you cannot modify the hosts file.
Have you tried adding the websites to your local.properties file?
In my local.properties file I have:
# B2C ACCELERATOR ELECTRONICS URLs
website.electronics.http=http://electronics.local:9001/yacceleratorstorefront
website.electronics.https=https://electronics.local:9002/yacceleratorstorefront
media.electronics.http=http://electronics.local:9001
media.electronics.https=https://electronics.local:9002
# B2C ACCELERATOR APPAREL-UK URLs
website.apparel-uk.http=http://apparel-uk.local:9001/yacceleratorstorefront
website.apparel-uk.https=https://apparel-uk.local:9002/yacceleratorstorefront
media.apparel-uk.http=http://apparel-uk.local:9001
media.apparel-uk.https=https://apparel-uk.local:9002
# B2C ACCELERATOR APPAREL-DE URLs
website.apparel-de.http=http://apparel-de.local:9001/yacceleratorstorefront
website.apparel-de.https=https://apparel-de.local:9002/yacceleratorstorefront
media.apparel-de.http=http://apparel-de.local:9001
media.apparel-de.https=https://apparel-de.local:9002
And I can access the stores with:
http://localhost:9001/yb2bacceleratorstorefront/?site=powertools
http://localhost:9001/yacceleratorstorefront/?site=electronics
http://localhost:9001/yacceleratorstorefront/?site=apparel-uk
I hope this helps,
Luke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apoorv,
it seems that URL pattern configured in your website in hmc doesn't resolved the logout URL.
You should check your website URL Pattern.
Thanks IK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.