How are profile permissions handled for public site access to skuid external data source?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
The new external data connections via model services are pretty awesome! I'm trying to figure out how they relate to profile permissions, especially for public sites users. We are working on a public site that starts with one skuid page and then launches another page. The second page includes a step that provides a review of data from an external data source. We have the first page working fine on the site but the second page hits an error. If we launch the page as a "preview", both work fine. We have reviewed the public access profile for objects, fields, apex, VF pages and all seems to be in order.

What I'm left wondering is what do I have to do to give the public site user access to this external data source? In Skuid, access is set to "unrestricted" for the model service.

Ideas or suggestions? Thanks in advance!
Photo of Christopher Johnson

Christopher Johnson

  • 694 Points 500 badge 2x thumb
  • a bit overwhelmed

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
What is the error you are getting?  Can you post a screenshot? 

My initial thinking is that you have a problem in your VF override code. 

We've integrated external data into public sites  (see: http://www.skuidify.com/skuid-banzai ) without a problem. 
Photo of Christopher Johnson

Christopher Johnson

  • 694 Points 500 badge 2x thumb
Hey Rob,

Thanks for taking a look. Error seems to start on the first page, as the conditional rendering beneath the buttons is not working.  The page loads and shows the error:

TypeError: $(...).data(...) is undefined
(see screenshot below)

We are passing in the URL parameter "bpguid" after the URL to the site as "/siteurl/?bgpuid=*****".  There are parts of the page that render conditionally based on finding records with that parameter (and those are not showing). Clicking on one of the buttons should save a contact record (if one wasn't found), launch another skuid page and pass the parameter to the next page. Instead it gives the skuid UI message "there was an error" and does not advance. As mentioned, it works fine in preview to start the sequence on the initial page, with the parameter, and continue to the next one.

I had suspected a profile configuration issue for the public access as well but can't track any down. Any advice much appreciated.

Cheers,
-c

(Edited)
Photo of J.

J., Official Rep

  • 7,690 Points 5k badge 2x thumb
I may just be missing something here, but is the Skuid page displaying at all when you are viewing it in the site? If not, one issue I've run into before when surfacing Skuid pages on public sites is the Site Guest User not having record level access to the necessary Skuid Page record(s). If your site users are using the Guest User (i.e. not authenticating), open up the Page in question in the Page Composer, click the "Share" button, and make sure your Guest User is listed there.

I don't think that's what's going on here though. That JavaScript error looks like your page is trying to access "editor" of a data attribute that doesn't exist. I'd look through your page for the line...
var editor = $('.helpTable').data('Art_Fund_Application__c').editor;
...and see if that points to anything.
Photo of Christopher Johnson

Christopher Johnson

  • 694 Points 500 badge 2x thumb
The guest user's profile has access to read, create and edit the related objects (Contact, Account, Application, Artwork, File). I did manually share the pages with the guest user and also found that the guest user needed the Skuid Viewer permission set. I set both of those but the same error shows in javascript and still failing to load the other skuid page. I added some more pages to the profile's access (stuff from the Skuid world) and got the error in Javascript to go away. However the page still doesn't render properly, not rendering the sections that are dependent on the parameter. And the button that launches the other page is now starting the actions on it but then erroring out ("there was an error" message from skuid, no specific error shown).

When I try to launch the visualforce page of the second skuid page without going through the first, it just renders the branding (header and footer) and a blank space where the page should go.

The first page of the wizard (second skuid page in process) is the one that makes the external data call. All the pages/flow work fine in preview mode. Stumped...
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
Mind granting us login rights? And sending the Org Id and specific pages and external site URL to us?   Support @skuidify.com 

Were pretty jammed today,  but will probably be able to take a look early next week. 
Photo of Christopher Johnson

Christopher Johnson

  • 694 Points 500 badge 2x thumb
Access granted. Email sent. Thanks for the support on this...really bizarre stuff.
Photo of Christopher Johnson

Christopher Johnson

  • 694 Points 500 badge 2x thumb
Thanks for taking a look, skuiders! Glad to know it wasn't an external data settings issue (was a combo of permissions and page model condition issues).