One of the restrictions (out of hundreds!) the Force.com platform places on Portal (Customer/Partner) is the footer and header size cannot be more than 10 KB. While this may help to increase the speed at the same time, it inhibits the custom long headers and footers that some customers have.
One of the work arounds this issue is to minify the HTML, JavaScript and CSS that is there in the headers. It really reduced the size of the Headers and Footers. Will Peavy created this beautiful page to minify HTML and all of its content. The note of caution is see that the jQuery/JavaScript is well formed otherwise it becomes very difficult to debug.
Monday, August 20, 2012
Thursday, August 16, 2012
Authorization Issue with Sites on Force.com
One of the most annoying things in any development is authorization errors. The problem multiplies itself when there is no stack trace on where the authorization errors are coming. Last couple of days we ran into a bunch of Unauthorized errors while accessing, Visualforce pages on public sites.
Today finally was able find the root cause. The issue was one of the columns referred in the SOQL belongs to the parent object and the object did not have access
Since, Salesforce does not display any error or where exactly this issue is here are few ways I think would help you to quickly identify the root cause
Today finally was able find the root cause. The issue was one of the columns referred in the SOQL belongs to the parent object and the object did not have access
Since, Salesforce does not display any error or where exactly this issue is here are few ways I think would help you to quickly identify the root cause
- Enable debugging for the sites users
- Check the debug logs and look for the log just before the authorization error
- Go to the bottom of the log and trace back the code
- One of the easier ways to find the issue is to add debug statements at different points where you think the most probable cause of failure could be
- Check of the statement that last executed
- Verify if the statement is the last statement in the method (apex code)
- If you don't see that it is the last statement, then the failure just occurred at the statement
- If the issue is with the SOQL, see that the columns being queried in the SOQL have access to the Force.com sites
Hopefully these steps will expedite the authorization issues you would encounter. Let me know if you found variations of this issue
Tuesday, August 14, 2012
Static resources on Force.com
One of the interesting things I ran into today while making customer portal pages look like another external web-site using static resources
The other idea may be to use Amazon CDN which would make the page load quicker
- use timestamp in the resource url
- For example if you are using static resources in a zip file (one of the best practices for maintaining static resources) use timestamp in the URL /resources/id/timestamp/<filepath>
The other idea may be to use Amazon CDN which would make the page load quicker
Sunday, August 12, 2012
One of my best Bike Rides
This Saturday Prthika and I were able stretch a bit to do a 26 mile bike ride along W & OD trail. It was a refresher. I've been doing 10-20 miles but this one was special.
Find more Bike Ride in Tysons Corner, VA
Subscribe to:
Posts (Atom)