404 error with popup page include

  • 1
  • Question
  • Updated 4 years ago
I have a popup with page include component which is failing for a specific profile, and returns a 404 error in the console, which looks like this:



It works for the System Administrator, but not for another profile with limited visibility. Is there a Profile Setting or System setting which might prevent a user/profile from loading components / snippets / resources?

Any suggestions on how to troubleshoot a 404 error?
Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Greg - here is a shot in the dark. Do your sharing rules prevent that profile from seeing pages they do not own?  Is that included page owned by someone else (like the sys admin?) 
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Make sure that the Profile has access to the "Include" Visualforce Page in the Skuid app, as well as to any local clones of the Include Visualforce Page, which it looks like you have in place.
Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb
Hi guys, I've checked sharing settings (which are all public read only) and object settings (which are all at least 'read' for the objects being queried) for the profile I'm having trouble with. Have also checked the profile has access to the visual force pages. I've left 'Tab to Override' as null as this was giving some problems last night. Still no joy.

The page is owned by the system admin. I have tried re-assigning ownership to the other user, but no gold there either. 

How would I assign page ownership to a group? I tried creating both a public group and a chatter group but they wouldn't populate in the reference field. Is the group created elsewhere?
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Greg, can you paste in the full URL that is causing the 404 error? I'm having a hard time reading the screenshot, and it may help us figure out what's going wrong to see the full URL --- e.g. the part in black from the screenshot you posted above.
Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb
HI Zach,

When the primary page loads, the url giving an error in the console is this:

GET https://na17.salesforce.com/javascript/source?lastMod=1409648022000&fileName=SessionServer190.js... 404 (Not Found)

na17.salesforce.com/javascript/source?lastMod=1409648022000&fileName=SessionServer190.js.map&projectPath=sfdc:1

then when I try to load the popup, the console gives this:

GET https://charterstack-7516--stack.na17.visual.force.com/apex/include?isinclude=true&page=NewOpera... 404 (Not Found) 
Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb
Hi Guys,

Just an update on where I am with this, I tried rebuilding the page from scratch to see at what point the page started failing, and it seems to be when I add a multi-select picklist into the table (last column in screenshot).

There's nothing unusual about how its been built, but it does still fail for all profiles except for the system admin. I've copied a screenshot below with the console errors which appear to be generated for each row being rendered (only 10 rows in this case):



The sandbox I'm working in has been updated to the latest nightly build 5.13.

Any thoughts?
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,004 Points 20k badge 2x thumb
Hi Greg,

The latest screenshot you posted might shed some light  --- I notice a /services/Soap/u/29.0 POST 500 failure, and the fact that it fails when you add a Multiselect Picklist to the page, suggests that it might be due to API Access. If your page has any Picklist / Multipicklist / Boolean fields that are Dependent on the value of another field / has a Controlling Field, then Skuid has to use the Web Services / AJAX API in order to retrieve the Dependency Metadata, as this is the only API Skuid can use to retrieve this metadata. Otherwise Skuid would have to show all picklist entries for the selected field.

So the solution is to give your Profiles / Permission Sets the "API Enabled" user permission. 

I'm guessing that the page screenshot you're showing is what non-System Admin Profiles are seeing? 
Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb
ah ha! Thats correct, the screenshot shown is for non-System Admin profiles. My understanding of 'API Enabled' is that this would also allow these profiles to connect to 3rd party services, e.g. Dataloader, which would also enable them to export data (e.g. a trainee could export the customer database) outside the system.

Have I got this correct or is there another way to prevent data export / connecting to 3rd party services (without restricting IP ranges)?

If I was to build in the controlling fields into the page conditions, would that help?