I've got the requirement to prepare a page that will be displayed to users when the Community is inactive. I prepared a Visualforce page and set this as "Inactive Site Home Page" in the Setup
> Sites
> My Site
configuration.
On this page I would like to display my c:ErrorPage
aura component via c:ErrorPageApplication
aura app.
InactiveSiteHomePage.page
<apex:page applyBodyTag="false" showHeader="false" sideBar="false">
<apex:includeLightning/>
<script>
$Lightning.use(
"c:ErrorPageApplication",
function() {
$Lightning.createComponent(
"c:ErrorPage",
{},
"lightningComponent",
function(cmp) {
}
)
}
);
</script>
<div id="lightningComponent"></div>
</apex:page>
ErrorPageApplication.app
<aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess">
<aura:dependency resource="c:ErrorPage"/>
</aura:application>
ErrorPage.cmp
<aura:component>
Hello There
</aura:component>
The problem is that there is potentially an issue with loading the LIGHTNING OUT
library on my Visualforce page when the Community is inactive.
GET https://xxx.xxx.force.com/c/ErrorPageApplication.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT 503 (Service Unavailable)
I found existing threads with similar but not exactly the same issue: