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.

3

1 Answer 1

5

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.

2
  • Good point, thank you. I've reproduced the issue and got "Previous load of class failed: utils" description.
    – maovrn
    Commented Jun 6, 2016 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
    Commented Jun 6, 2016 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .