I am trying to setup Community Self-Registration on a Lightning Community with a modification to use an existing account and contact vs creating a new contact and using the default account. After figuring out that CommunitiesSelfRegController is only used for classic Communities, I updated LightningSelfRegisterController in my dev environment and ran through the self-registration process while debugging the guest access user.

Oddly, LightningSelfRegisterController doesn't appear to be getting called (no debug statements in logs), even though I opened the selfRegister Lightning Component, which is the one used on the /Register page, and verified that LightningSelfRegisterController is the controller declared in the <component/> tag:

<aura:component controller="LightningSelfRegisterController">

Assuming that I still may not have setup the DEBUG log correctly, I even went as far as inserting throw new CustomException() statements in the controller method calls, but the self-registration page completely ignores it and just registers the user using the default process.

Do I need to tell Salesforce to use the customized LightningSelfRegisterController vs the standard process in same way?


The solution that worked for me:

  1. Create a copy of selfRegister component
    • Just copy-paste the code
    • It's because selfRegister component appears only in Identity group and I couldn't re-use those components on my custom pages
    • I was using Build Your Own Template and had to create another Customer Service (Napili) theme to get selfRegister and LightningSelfRegisterController
  2. Change a name of the new component in design bundle (.design file)
  3. Create a new public page that will contain your new component
  4. Update self-registration setting to point to your new registration page
    • Setup > All Communities > Workspaces > Administration > Registration > Community Builder Page: New Register Page
  5. Setup logs for a Guest User
    • Put Site In Lookup field, when setting the trace, to show all community Guest Users
  6. In an anonymous window open your community page, click Sign Up
    • You should be redirected to your new Registration page
  7. Now you should be seeing full debug logs

To me, it looks like Login Pages / Identity Components (Self Registration, Change Password, Login Form, ...) have debug logs turned off by design.

| improve this answer | |
  • Thanks @Michal, I was able to get it to work with this approach. Curious to know if you ran in to minor styling issues on form fields/button when you copied the existing component? Also, designer attribute names are strange too. – Swisher Sweet May 2 '18 at 21:43
  • 1
    @SwisherSweet If I remember correctly copied component wasn't exactly the same as the one from Idenity Components section. I was doing custom registration form I had no styling issues. If you could be more specific I will be happy to help you. – Michal Vavra May 3 '18 at 16:47
  • Thanks, I figured out they are not the same as well, so corrected the styling manually using CSS. Thanks again! – Swisher Sweet May 3 '18 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.