+ Start a Discussion
Rob GoldiezRob Goldiez 

Community Access from Sandbox Suddenly Broek

I'm experiencing a strange problem that cropped up yesterday morning.  I am suddenly getting a 'page not found' error when trying to access my community in my sandbox org.  I have not changed any of the custom URL settings in weeks and was accessing and using the sandbox community the very night before without issue.

Sandbox: https://sandbox-hirebotics.cs51.force.com/ (<-- page not found error)

Production:  https://robots.hirebotics.com (<-- works fine)

After three phone calls / go-to-meetings with salesforce support they can't figure out what's going on.  Their latest guess is that my product custom URL in sandbox (which is copied into sandbox upon a refresh, which I haven't done in a week) is set to "in development".  But they can't tell me why that's a problem now nor how to change that, assuming that's the problem.  They suggested I post here.  See below.
Custom URL in Sandbox

Now, I also tried spinning out another developers sandbox from my working production org and I'm seeing the exact same problem accessing the login page hosted from this new dev org.

Note that the error page below is being served from my org as the email us link connects to my email address.
Community Error Page

Also, both my sandbox and dev sandbox are hosted on CS51, if that's relevant.

Any idea what's going on?  
 
Andy BoettcherAndy Boettcher
If you go to that URL, it auto-redirects to https://sandbox-hirebotics.cs51.force.com/s/ (note the added /s/).  Do you have some sort of redirect or default page set up on that site that is doing that?
Andy BoettcherAndy Boettcher
Just checked your Prod link and it does the same thing - the /s/ - and it works.  Keep on support, something broke on their end.  =)
Rob GoldiezRob Goldiez
Andy - Yep...... same thing in production.  It's an artifact of the new Community themes.  

Interestingly, if I switch the sandbox community to the standard 'Tabs + Visualforce' (ie, no theme other than standard salesforce look and feel) the pages serve up just fine.  When I switch back to the new Napili theme, it breaks again.
Andy BoettcherAndy Boettcher
Did you do any customization to the Napili theme at all?
Rob GoldiezRob Goldiez
Yes, working on some custom lightning components for the community.

Production is working fine.  I even spun out a dev org based off production and that dev org is broken like my regular sandbox.
Andy BoettcherAndy Boettcher
Hmmm - kicker is I haven't done lightning against the Napili theme yet.  Thoughts...some sort of hardcoded URL?  (dumb question, but hey...)
Rob GoldiezRob Goldiez
No dumb questions at this point!  But no hard coded things.  

The sandbox should bring you to a standard community builder login page based on salesforce's new templates (no customizations other than the logo like you see on the production link).  
Andy BoettcherAndy Boettcher
Yeah - that seems like something just *broke* somewhere.  So if you cut that new sandbox - without any customizations to Napili is it still broken?
Rob GoldiezRob Goldiez
The dev sandbox I cut is based of my production org, which has some customizations to the Napili theme but they work in production.  So, the fresh dev sandbox wasn't tweaked at all after I cut it from sandbox, and it's broke like my regular sandbox.  Both sandboxes are on CS51.  Is it possible that this is limited to CS51 (or some subset of instances)?

What I've seen is if I have an issue with a lightning component, I get an error in the component portion of the page (but my template header is still present).  In this case, it looks like it can't find the template pages to serve up.
Andy BoettcherAndy Boettcher
Yeah, I agree with you on this one - it looks as if the template itself may be broken on at least your pod, especially when you can turn it off and the community works as "normal".

Can you pull those customizations all the way out and see if the "naked" Napili theme works at all in the sandbox?

(Keep on support's rear on this one - don't let them do the pass-the-buck shuffle)
Rob GoldiezRob Goldiez
In my dev sandbox, I confirmed that my lightning component is not in the theme and the login page is set to the default login page (not the one with our logo).  Same problem.
Rob GoldiezRob Goldiez
I got a lot of attention from salesforce support and R&D folks this week.  Definitely a bug.  They think it may have been something related to sandbox refresh.  They got me fixed up.  Asked that if it happens again to re-open the case.
BTheForceBTheForce
For anyone who's still looking for an answer, this is how I resolved it.

The reason why you encounter this issue in the developer sandbox is probably because you may have community pages that are not published yet in the sandbox.

1. Go to Commuity Management. The "Community Home" should be pointing to a "Community Builder Page" like in Production. That may not be the case in your developer sandbox and it might be pointing to the "Default page".
2. Go to the Site.com Studio (you'll find the link to it in the same page in step 1)
Community Home Page
3. Locate the Site Pages and Publish them.
User-added image

4. Try loggin in as the community user now and you should be able to successfully land on the Community home page in the developer sandbox.
stmfaizanstmfaizan
Thanks a lot @BTheForce 
Adams CarrollAdams Carroll
That worked for me @BTheForce