You need to sign in to do that
Don't have an account?
Site and Customer Portal - Under Construction Error
I'm using a Site as a custom login page for my customer portal. I'm able to login and redirect the user to the /home/home.jsp page to get to the customer portal home page, but I'm getting the error message page instead of my custom home page (VF page). It says "https://mycompany.secure.force.com/portal/ is under construction". When I login via the portal URL, I don't get this error page. I checked all of the class and VF page permissions for the portal profile.
Any ideas what could be wrong?
I was able to resolve this by using the startUrl = my portal URL.
example:
global PageReference login() { String startUrl = System.currentPageReference().getParameters().get('startURL'); PageReference PageRef=Site.login(username, password, startUrl); if(PageRef!=null) { PageReference PortalLogin=new PageReference('https://na8.salesforce.com/secur/login_portal.jsp?orgId=XXXXXXXXXXX&portalId=XXXXXXX&un='+username+'&pw='+password); return PortalLogin; }else { return PageRef; } }
All Answers
HI
This url (/home/home.jsp) is for internal user and not for portal use. You should just redirect to your site address (which is defined in site base url) like abcd.efgh.na6.force.com or abcd.efgh.na6.force.com/myhome (if your home page is myhome).
Thanks,
Kc
Thanks for your reply! I tried that previously, but it would just refresh the page and show the "logout" link so I could tell that I was being logged in, but all I could see was the login screen.
Here's my code. I would appreciate it if you could make suggestions on how to modify it.
Firtst don't use site.
Go tp your Org and try to login from your org not from site.
Your Login page will have some name. put it in the url \apex\LoginPageName.
and try to debug the code. Some time it happens that there will be any exception but we are not able to because we are on site.
From site any exception it will show same page.
I think your are using standard site login code ??? So there may be problem with credentials. Because for the customer portal username and Credentials are generated form the account object,
Please Check
Bunty
I was able to resolve this by using the startUrl = my portal URL.
example:
global PageReference login() { String startUrl = System.currentPageReference().getParameters().get('startURL'); PageReference PageRef=Site.login(username, password, startUrl); if(PageRef!=null) { PageReference PortalLogin=new PageReference('https://na8.salesforce.com/secur/login_portal.jsp?orgId=XXXXXXXXXXX&portalId=XXXXXXX&un='+username+'&pw='+password); return PortalLogin; }else { return PageRef; } }