Partner Communities: Skuid will not display (page override issue?)

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
I'm going through the process of testing a basic Partner Community setup in my Developer Edition.

My Community is currently using "Tabs & Visualforce" as its template. I'm trying to execute a basic page override for the record detail view on Opportunities, but Skuid pages are defaulting to the standard Salesforce view in the Community.

I've followed all the tutorials and searched the Skuid Support forum, but can't find much that pertains specifically to this issue.

What I want to happen:
  • A user with the custom profile "Community Login User - Partner One (Custom)", who logs into my org's Partner Community, will be served a custom Skuid page called "PXOpportunityTest" when they go to view an Opportunity record.
What's happening instead:
  • The Partner Community user logs in, navigates to Opportunities, clicks an Opportunity, but is served the traditional Salesforce page layout instead.

My Visualforce Page:
  • Following the tutorial, I've overridden the "View" action in "Button, Links, and Actions" for Opportunities with a custom Visualforce page, which contains this code:
    <apex:page standardController="Opportunity" action="{!redirect}&actiontype=View&objecttype=Opportunity" extensions="skuid.Redirects"/>
My Skuid Page Assignment configuration:
  • Object Type: Opportunity
    Action Type: View
    Applies to: Community Login User - Partner One (Custom)
    Record Type: Any Record Type
    Page to Use: PXOpportunityTest

Troubleshooting I've already done:
  • My Partner Community User's custom profile: "Community Login User - Partner One (Custom)" already has the Skuid Page Viewer permission set enabled

  • My Visualforce page has the correct security settings to allow the "Community Login User - Partner One (Custom)"profile to view it.

  • I've added the Skuid Page Viewer profile to my Community:


  • Just to test, I created a duplicate Skuid Page Assignment for System Administrator, and tested it on the internal Salesforce org (i.e. not in the Community). The redirect worked as expected. This tells me that it's an issue with Communities.



  • When accessing an Opportunity record detail in the Partner Community, I noticed that the URL would first direct to this:
    https://bscg1-developer-edition.na31.force.com/partner1/apex/skuid__UI?id=00637000006XpFO&sfdc.override=1&actiontype=View&objecttype=Opportunity
    
    And once the page loaded, it would end up like this:
    https://bscg1-developer-edition.na31.force.com/partner1/00637000006XpFO?nooverride=1&sfdc.override=1
    I tried removing the override queries from this URL, to no avail.

Any ideas on what's going on here?
Photo of Aaron Faucher

Aaron Faucher

  • 178 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
Does the Community user have an assigned Skuid License? You mentioned that you assigned viever permissions but nothing about license. Maybe to obvious, but just pointing it out just in case
Photo of Aaron Faucher

Aaron Faucher

  • 178 Points 100 badge 2x thumb
Hi Peter, thanks for helping me out with this.

Yes, the Community users had been assigned Skuid licenses - the basic license, as well as the Page Viewer license. Here are screenshots of the configuration:





Unfortunately, the problem persists. Any other ideas?
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
Have you tried viewing an opp detail page in the community with skuid without using the override? Just to be sure if the problem is displaying an opp detail or if it is the override.
Photo of Aaron Faucher

Aaron Faucher

  • 178 Points 100 badge 2x thumb
Hi Peter - if I understand correctly, you want me to confirm that the Opportunity Detail page is displaying the standard layout correctly in the Community when I have the View override (under Buttons, Links, and Actions) set to "No Override" (instead of the Visualforce page).

Just to test, I tried turning off the Override:


And yes, in this scenario the detail page correctly displays the standard Salesforce Opportunity Detail layout on the Community for the custom profile user.


So the takeaway here is - the issue is definitely with the override, and not in displaying an Opportunity Detail.

I'm following up with an additional post momentarily - I just tried turning off Page Assignments based on profile, with some odd results that might help diagnose the problem.
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
No I meant viewing the Opportunity using the Skuid page in the Community either by building the URL including id-parameter manually or by giving the partner community user page editor access and load the page and do a preview. But it is good to know that you have access to the regular opp detail as that rules out object and field access issues. I'll try to setup a partner community in a dev org later tonight and see if I can get it to work. 
Photo of Aaron Faucher

Aaron Faucher

  • 178 Points 100 badge 2x thumb
Turning off Page Assignments:
In my original post, I was using Page Assignments to specify that the user profile "Community Login User - Partner One (Custom)" should be directed to the Skuid page PXOpportunityTest. I used the following code on my Visualforce page to override the "View" function on Opportunities (same as above).
<apex:page standardController="Opportunity" action="{!redirect}&actiontype=View&objecttype=Opportunity" extensions="skuid.Redirects"/>
I just tried another troubleshooting approach – bypassing page assignments and making the override globally for all profiles. I followed the Skuid tutorial on how to Override a Detail Page to confirm I was following the correct steps.

I removed all Page Assignments from Skuid, and replaced the Visualforce code above with the following:
<apex:page action="{!redirect}&page=PXOpportunityTest" extensions="skuid.Redirects" standardController="Opportunity">
</apex:page>
The result:
When logged in as System Administrator, the override works correctly on the Opportunity Detail page.


Just to check, I popped open the Chrome console. Besides a failed load on a Salesforce logo resource, no problems:


When logged into the Community as a Community User with the "Community Login User - Partner One (Custom)" profile, the same page simply does not render (the page below should be the detail page for "Burling Textiles" Opportunity). Here's the URL for the broken community page:
https://bscg1-developer-edition.na31.force.com/partner1/apex/skuid__UI?id=00637000005JpBz&sfdc.override=1&page=PXOpportunityTest


Opening up the console, however, I saw an additional issue:

In case you can't see from the image, here's what the console reads:
Uncaught TypeError: Cannot read property 'add' of undefined(anonymous function) @ skuid__UI?id=00637000005JpBz&sfdc.override=1&page=PXOpportunityTest:40
skuid__UI?id=00637000005JpBz&sfdc.override=1&page=PXOpportunityTest:1 GET https://na31.salesforce.com/17181/logo180.png 404 (Not Found)

The error is happening on Line 40 (see below):



TL;DR
With page assignments turned on, my Community user would see a regular Opportunity Detail page, instead of the intended custom Skuid page. System Admin working internally would see the Skuid page.

With page assignments turned off (i.e. with a global override of the View function), my Community user would not see any Opportunity Detail page rendered at all. System Admin working internally would see the Skuid page.

I'm hoping this additional info can help diagnose this problem.
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
I did set up a community and gave the community partner user the page editor permission set and exposed the Pages tab in the comunity. When i clicked the pages tab logged in as Community user I got the exact same error in the console as you did. (Cannot read property). I tried cloning the communities user profile and enabled API. Same problem. I cloned the 3 VF pages ExportData, UploadImages and Include to local copies with the same name. Same problem still. I changed sharing settings for the Pages and Page Assignment to Public Read Write and voila, no errror message and the page builder started to work. Do the same and see if it helps, if it does you should be able to work backwards and find the necessary minmum settings for it to work.
Photo of Aaron Faucher

Aaron Faucher

  • 178 Points 100 badge 2x thumb
Peter - great - I'll try this and report back! Thanks for your help!
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
And i did get it to work with the page override as well. I have it in a Winter16 testing dev.org so if you don't get it to wok just let me know your e-mail and I will create a login for you and then you can compare settings.
(Edited)
Photo of Aaron Faucher

Aaron Faucher

  • 178 Points 100 badge 2x thumb
Just another data point here:

After turning Page Assignments back on, I checked to see if I still had the same "UncaughtType" console error when accessing the Opp Detail my Community. I didn't.



My guess right now is that whatever problem I'm having, it's somewhere  in the realm of "Profiles."

When I turn off Page Assignments and change my Visualforce to override globally, it seems like my Community is TRYING to render the Skuid page, but something's not letting it (i.e. the console error).

When I turn on Page Assignments and change my Visualforce accordingly, it doesn't even seem like the Community is attempting to render Skuid when I access the Opp Detail page - it's like VF/Skuid is not associating my logged-in user with the correct profile, so it's not even trying to serve the Skuid page.

There are my hypotheses for now - I'm going to keep digging. Any additional help from Skuid support team would be appreciated. My company is excited to use Skuid to use for several upcoming Communities / Portal projects, but unfortunately this hangup is preventing us from doing so.
(Edited)
Photo of Peter Baeza

Peter Baeza

  • 2,868 Points 2k badge 2x thumb
and this seems to indicate the same problems as you are seing with the possible exaplanations https://community.skuidify.com/skuid/topics/skuid-page-failing-to-load-in-customer-community
Photo of Aaron Faucher

Aaron Faucher

  • 178 Points 100 badge 2x thumb
Thanks for your research and the link, Peter. Both were extremely helpful.

The final solution was simple:

Go to Security Controls > Sharing Settings, and change the settings for Page and Page Assignment to "Public Read Only" (or Public Read/Write, as you mentioned above).



With that one fix, Skuid pages are now displaying on my Community. I've tried this both with a global VF override, and with the Skuid Page Assignments, and both work as expected.


As you can see, fonts are not yet displaying correctly - I imagine that has something to do with my Community User's profile access to static resources. I'll open that up on a separate thread if I can't figure it out.
Photo of Joshua Sangster

Joshua Sangster

  • 232 Points 100 badge 2x thumb
Hi JD,

Are you referencing the static resources issue or something different? 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
JD is referring to the original issue that Aaron solved by making his pages public read only.  The data on the pages is not affected by this setting, only the pages themselves.  So an account I cannot see will not be shown even though I go to a Skuid page for that Account Id.  The page will load,  but the model will simply be blank. 

JD is more security conscious that most of us.  The leftover nervous tics from working at the big company IT shop... 

Regarding your issue.  Is this by chance a pretty recent org?  Do you have the critical update "Serve Static Resources from the Visualforce Domain" implemented?  It has caused us this sort of problem with static resources.  
http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_cruc.htm



Photo of Joshua Sangster

Joshua Sangster

  • 232 Points 100 badge 2x thumb
Thank you Rob! Unfortunately, That current update is not applied to the prod or sandbox orgs, so it does not seem to be related to the issue we are experiencing with the font issues. Any other ideas?
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Hi Joshua, What version of Skuid are you running? I know that an issue with loading fonts in communties was fixed in Skuid 7.24.
Photo of Joshua Sangster

Joshua Sangster

  • 232 Points 100 badge 2x thumb
Ben,

Thanks for reaching out. Currently on version 7.27