Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Access level to ErrorPage::$db must be public

Go to End

3 Posts   3646 Views


Community Member, 22 Posts

13 February 2014 at 4:10am

I have an error when dev/building my site and don't quite understand this problem.

The error i get is:
Fatal error: Access level to ErrorPage::$db must be public (as in class Page) in /home/deb78737/domains/ on line 310

The answer i found on the silverstripe page does not work for me. --> link:

When i change my statics to private nothing is working anymore. When i change it back to public the front-end works but the CMS does not work anymore.

I'm using Silverstripe 3.2.1


Community Member, 187 Posts

13 February 2014 at 5:15am

Hi SilverPeed,

The documentation you linked to is correct, you need to change 'public static' to 'private static'. After you've done this, you'll need to visit - I suspect that this is why it wasn't working for you.

If that doesn't solve the issue, make sure that both the CMS and Framework have been updated to 3.1.2 (and any modules are compatible with 3.1).



Community Member, 22 Posts

18 February 2014 at 2:04am

Thanks for you answer,

I probably made a typo somewhere
I removed all the files except Page.php in my "Code" en replaced the code of Page.php with the original Code.
Did a Dev build en it worked. When i put my other files back in the "Code" folder, those worked as well.