6

I have a Community portal developed. It contains a hundred VisualForce pages with apex controllers that refer to custom and standard Salesforce objects. Users have 'Customer Community Plus' license.

The users complain that they are redirected to Generic Error Page from time to time. I was not able to catch the Exception using Debug Logs. So I suppose the issue is related to the fact that Portal user is not able to compile apex classes.

Two workaround steps work for me:
1. Login as administrator, go to Setup -> Develop -> Apex Classes, then click 'Compile all classes' link. But the step does not always work.
2. Login as standard user, open each VF page to execute the apex classes.

I have to repeat the steps after each deployment even if the changes do not affect the site. It takes hours.

What would you advise me in the case? Is there a way to compile classes automatically?
Thank you.

4

You can easily catch the exception from debug logs

Just go to generic exception page in the VF page code you will find line

<apex:param value="{!$Site.ErrorMessage}"/> change that to <apex:param value="{!$Site.ErrorDescription}"/> and after that when you will run your page you will get detail exception also in your debug log you will complete exception details.

  • Good point, thank you. I've reproduced the issue and got "Previous load of class failed: utils" description. – maovrn Jun 6 '16 at 15:23
  • Utils is a custom class in my org. According to the description of error the class needs to be recompiled. So, I confirmed my assumptions, but the issue is not solved still. – maovrn Jun 6 '16 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.