[SalesForce] Custom Communities Login Page – Forgot Password page

I have a custom Communities Login page that is using the SiteLogin component. The issue is that once the Forgot Password link is selected, the http://mycommunitydomain.force.com/ForgotPassword URL is loaded, however this page is no different than the login page. It's almost as though something is erroring and then redirecting me back to login page, but he URL is not changing. Any one have any guesses as to what I'm doing wrong here?

Custom Login Page:

<apex:page id="loginPage" controller="CommunitiesLoginController" title="{!$Label.site.site_login}">
    <link rel="shortcut icon" href="{!URLFOR($Resource.CC_Assets, 'images/favicon.ico')}" type="image/x-icon" />
    <link rel="apple-touch-icon" href="{!URLFOR($Resource.CC_Assets, 'images/apple-touch-icon.png')}" type="image/png" />
    <link rel="stylesheet" href="{!URLFOR($Resource.CC_Assets, 'css/zen-container.css')}" />
    <div class="login-header">
        <div class="login-header-promo">
            Powered by
        </div>
    </div>
    <div class="login-body">
        <div class="login-form">
            <apex:insert name="login">
                <c:SiteLogin />
            </apex:insert>
            <div id="rem" class="wrapper_remember">
                <input type="checkbox" id="rememberUn" name="rememberUn"></input>&nbsp;<label for="rememberUn">Remember Username</label>
            </div>
            <div id="employees">
                Employee? <a href="https://login.salesforce.com/">Login here</a>.
            </div>
        </div>

SiteLogin component:

<apex:component controller="SiteLoginController" id="loginComponent" 

<apex:form id="loginForm" forceSSL="true">
    <apex:outputPanel layout="block">
      <apex:pageMessages id="error"/>
        <div class="identity first">
          <apex:inputText id="username" styleClass="user-input" value="{!username}"/>
        </div>
        <div class="identity last">
          <apex:inputSecret id="password" styleClass="password-input" value="{!password}"/>
        </div>
        <apex:commandButton action="{!login}" value="{!$Label.site.login_button}" id="loginButton"/>
        <apex:panelGroup id="theLinks">
          <apex:outputLink value="{!$Page.ForgotPassword}"> {!$Label.site.forgot_your_password_q}</apex:outputLink>
          <apex:outputText value=" | " rendered="{!$Site.RegistrationEnabled}" />
          <apex:outputLink value="{!$Page.SiteRegister}" rendered="{!$Site.RegistrationEnabled}">{!$Label.site.new_user_q}</apex:outputLink>
        </apex:panelGroup>
    </apex:outputPanel>
  </apex:form>
</apex:component>

ForgotPassword page:

    <apex:page id="forgotPassword" showHeader="false" controller="ForgotPasswordController" title="{!$Label.site.forgot_password}">
 <apex:composition template="{!$Site.Template}">
    <apex:define name="body">
      <center>
        <apex:panelGrid bgcolor="white" columns="1"> 
          <br/>
          <br/>
          <apex:panelGrid width="758" cellpadding="0" cellspacing="0" bgcolor="white" columns="1" styleClass="topPanelContainer"> 
            <br/>
            <apex:outputPanel layout="block" styleClass="topPanel">
              <apex:panelGrid width="758" cellpadding="0" cellspacing="0" bgcolor="white" columns="2"> 
                <apex:image url="{!URLFOR($Resource.SiteSamples, 'img/clock.png')}"/>
                <apex:panelGroup >
                  <br/>
                  <apex:outputText styleClass="title" value="{!$Label.site.enter_password}"/>
                  <br/>
                  <apex:form id="theForm">
                    <apex:pageMessages id="error"/>
                    <apex:panelGrid columns="3" style="margin-top:1em;">
                      <apex:outputLabel value="{!$Label.site.username}" for="username"/>
                      <apex:inputText required="true" id="username" value="{!username}"/>
                      <apex:commandButton id="submit" value="{!$Label.site.submit}" action="{!forgotPassword}"/>
                    </apex:panelGrid> 
                    </apex:form>                  
                  <br/>
                </apex:panelGroup>
              </apex:panelGrid> 
             </apex:outputPanel>
            <c:SitePoweredBy />
          </apex:panelGrid> 
       </apex:panelGrid>
      </center>
      <br/>
    </apex:define>
  </apex:composition>
</apex:page>

Best Answer

I resolved this issue by hard-coding the URL for the standard forgot password in the value attribute in Apex:Outputlink in the SiteLogin component:

<apex:outputLink value="/secur/forgotpassword.jsp?locale=us"> {!$Label.site.forgot_your_password_q}
       </apex:outputLink> 
Related Topic