1

I'm not great with communities and have encountered a road block in my lightning component.

My Lightning Component is supposed to show a List of Custom Object Records. The component has implemented necessary interfaces as well:

implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,forceCommunity:availableForAllPageTypes"

I'm failing to understand when I can see this component in Community Builder and drop it on Home Page. But when I publish the community and then a community user logs in, he gets nothing on the page.

In my debugging I found No Errors in browser console log as well. In Debug Logs under setup, it didn't trigger anything from the component as if the component was simply never put in the page and thus never fired any load/render function.

Has anyone else faced this kind of issue? and have any suggestions to try out?

And yes, my Lightning Component has access="global" as well as the Attributes are also set to access="global"

  • Assuming you do not have say page variation, does your logged in User have necessary access to the records? In case of no records returned from server, what do you display on component? A good way in these scenarios is to just put some generic text and verify if the component at the first place is being rendered or not. – Jayant Das Sep 21 '18 at 12:32
  • Yes, the access on Record/Object level is there, the data from same objects is being shown in another component on the page. Editing the component is going to be a tricky issue, as it is in my managed namespace and my development organization do not exhibit this issue it is only manifesting in an external org when I install my app/component. So before making any code related changes I was looking forward to hear any opinions on what else I might be missing. – VarunC Sep 21 '18 at 12:35
  • If the data is not showing up one thing to check could be controller with sharing and without sharing! – codeyinthecloud Sep 21 '18 at 13:34
  • Nopes, it's that the component itself is not rendering at all. I could not even find any reference of it in browser source, when inspecting, and no errors in browser console of any sort. And just to be sure, I can confirm that my apex controller is using with sharing. – VarunC Sep 21 '18 at 13:36
  • Did you end up solving this? I'm experiencing this at the moment. In my case it was working and now suddenly stopped showing up. – ijason03 Apr 23 at 18:43
0

The community user profile has no access to your Lightning Apex Controller.

https://help.salesforce.com/articleView?id=users_profiles_apex_access.htm&type=5

| improve this answer | |
  • In my case the class is already enabled in community user profile. – VarunC Sep 25 '18 at 20:46
  • Is your class access modifier global? – Rianno Rizarri Sep 26 '18 at 6:26
  • Yes, it is global. Would that make a difference? – VarunC Sep 26 '18 at 7:23
  • The profile doesn't have atleast read access to the custom object. – Rianno Rizarri Sep 26 '18 at 7:32

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.