Skip to main content

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:




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.




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?

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


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?


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.


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.


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. 


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).


<page standardcontroller="Opportunity" action="%7B!redirect%7D&amp;actiontype=View&amp;objecttype=Opportunity" extensions="skuid.Redirects"></page>

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:


<page action="%7B!redirect%7D&amp;page=PXOpportunityTest" extensions="skuid.Redirects" standardcontroller="Opportunity"> </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.


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.


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.


Peter - great - I’ll try this and report back! Thanks for your help!


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.


and this seems to indicate the same problems as you are seing with the possible exaplanations https://community.skuid.com/t/skuid-page-failing-to-load-in-customer-community


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.


Thanks for sharing the solution, Aaron. Let us know if you run into any more problems with this (or anything else in Skuid) 🙂


Aaron, were you able to figure out the static access issue? I am having a similar problem. Users can see the page now, but it is not correctly displaying and is throwing errors.


Hi, Joshua,
What kinds of incorrect display and errors are you getting? If you post a screenshot, I can take a look at it.
Thanks!
Emily


Hi Emily,

I think we figured it out; when using static resources on a page, we have to make them publicly viewable. The only issue remaining from there is how do we make the fonts in Skuid available? It seems we are still getting an error in the browser that they are unavailable.


Hey, Joshua,
I’m really sorry for the slow reply. Do you mind posting screenshots of the font issue you’re experiencing, as well as the browser error you are getting? Are these fonts with a custom theme or just a Skuid out-of-the-box theme?
Thanks,
Emily


Emily,

I apologize for the late reply. The fonts are with a custom theme. We are seeing two errors, 

Failed to load resource: the server responded with a status of 404 (Not Found) https://use.typekit.net/Frutiger%2045%20Light.js 

And

Failed to load resource: the server responded with a status of 503 (Service Unavailable) https://mycommunityname-company-cs11.force.com/resource/skuid__Fonts/fontawesome-webfont.ttf?v=4.2.0

My assumption was a permissions issue for users in the community, as this only happens when viewing the page through the community, not in the actual salesforce instance.


You may want to carefully consider whether or not “public read only” is the appropriate security model in this case, as this will allow a savvy user to access any Skuid page in your org. A better approach might be to use record sharing, as that was probably the issue to begin with (from the composer, click the sharing button, then share appropriate pages with the user or group of your choice)


Hi JD,

Are you referencing the static resources issue or something different? 


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




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?


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.


Ben,

Thanks for reaching out. Currently on version 7.27


Reply