So I have a lightning component

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" controller="GSTAR_LGHT_CTRL">
<aura:attribute name="accs" type="Account[]"/>

<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>

<lightning:layout>
    <lightning:layoutItem padding="around-small" size="6">
        <lightning:card title="My Brand new Lightning Component">
....

And it shows up in my Community Builder. And I am able to publish my community builder and set it as the landing page for my community.
But when I log in as a community user my Lightning Component is just not there. All the other components from the Builder show up.
So what am I missing?

  • Did you receive community published successfully email before loging in and trying? – Pranay Jaiswal Nov 29 at 12:41
  • @PranayJaiswal, yes. – AvailableName Nov 29 at 12:42
  • Also can you check if you have provided Access to Class "GSTAR_LGHT_CTRL" to community user profile? – Pranay Jaiswal Nov 29 at 12:43
  • @PranayJaiswal Yup. That profile has access. – AvailableName Nov 29 at 12:47
  • It should work, Its very strange. Can you remove init handler in your code, save and then try refreshing the community? – Pranay Jaiswal Nov 29 at 12:51
up vote 4 down vote accepted

Check the objects referred in component by the Community site User have access to that Object in Profile Settings. If not, the component won't be displayed.

  • 1
    The profile in use for this community did not have read access to the Account object. Setting that fixed it. – AvailableName Nov 29 at 13:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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