1

I am getting an issue when applying Lightning Components for Community:

I created a Custom Visualforce Page, on this page I added a few Lightning Components and they are working fine. I set the page to "Community Home", now I login as a Partner User but the data at the Lightning Components don't work. I also implemented the forceCommunity:availableForAllPageTypes interface: Please help me how to do the Lightning Components can work on Community?

Thanks Jerry

2

There is a domain related issue that we are working on that is Community specific. We have fixed this in Spring'16 already and are evaluating backporting the fix to Winter'16 patch.

Related post Lightning Out for Visual Force in a community works in dev org but fails in sandbox

| improve this answer | |
  • Thank you for your reply, I am using Winter's 16, my Visualforce Page is API version 35.0. – user3767018 Nov 5 '15 at 7:43
  • I am getting an error about "Service Unavailable" on my browser, here is the error: "aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT 503 (Service Unavailable) $Lightning.use @ lightning.out.js:42 (anonymous function) @ Portal:451 " – user3767018 Nov 5 '15 at 7:44
  • 2
    The backport has been approved and I am working on getting into the next Winter'16 patch that is supposed to deploy early next week. Nit much we can do under communities until then. You can of course continue to develop and test by accessing the VF page directly until then. After the patch is deployed to our service things should just work. – Doug Chasman Nov 5 '15 at 11:36
  • @DougChasman this is very important for us, too. Thanks for pushing this. – Uwe Heim Nov 5 '15 at 15:11
  • @DougChasman could you please confirm when the patch will be applied this week? We are really struggling, there are 100+ users just waiting to be migrated to the community. Thanks Jerry – user3767018 Nov 9 '15 at 4:29
1

Fix for this should be on all instances now. We've also released a new Visualforce component to make this even easier (no need to worry about sessionID or base URLs). Documentation update will be out next week but this is the short version: just change:

<apex:includeScript value="/lightning/lightning.out.js" />

to:

<apex:includeLightning/>

and you should be good to go for all contexts where your Visualforce page can be used.

| improve this answer | |
0

The patch that @DougChasman mentions does seem to have rolled out now. I've been having the same problem and it has now gone in the production and sandbox orgs I've tried.

I have still been seeing a 503 response though even when using the new apex component but this is due to lightning.out.js being cached somewhere in the network infrastructure. I have browser cache disabled and get lightning.out.js code thats unchanged from before the fix, but appending ?x=x to the request gets different code. Having changed the community path it all works.

| improve this answer | |
  • Martin you should no longer need to (or want to) specify base url /or session like this. Will you please switch to <apex:includeLightning/> and verify that this works and then could I ask you to delete this answer provided it does? Thank you – Doug Chasman Nov 12 '15 at 14:02
  • That workaround does still seem necessary on a dev org with <apex:includeLightning/> and a path in the community url. Removing the baseUrl argument is still giving a 503 on the app load (path is not included on the request url). Haven't had chance to try a sandbox or production org yet. – Martin Lewis Nov 12 '15 at 17:33
  • (The sessionId here is not relevant to any of this by the way, I just happened to paste in some code that was passing that into the component to allow it to upload files with the rest api.) – Martin Lewis Nov 12 '15 at 17:41
  • Its a cache thing, I've updated the answer. – Martin Lewis Nov 13 '15 at 10: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.