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.