Is this link still relevent - http://doc.silverstripe.org/tutorial:2-extending-a-basic-site?
I've upgraded to version 2.4.2, used this to try to create a new page type and page, and when I do dev/build, the new pages do not appear in the CMS or the database.
I have a page type and page that I created using this tutorial when I was using version 2.3.8, and now the page, which has the added items to the CMS, will not open at all, and I get "error loading page" in the CMS (although it will load in the browser, just without the date and author info). I've tried changing the code for the date field, and removing the code for the additional fields completely, but nothing seems to be able to correct it. I also cannot create a new page. Can anyone help correct this? Thank you.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
I get "error loading page" in the CMS (although it will load in the browser
If you look at your javascript error console (eg Firebug's console tab) you should be able to see the actual error message in the response tab. If you don't have Firebug, install it, if you don't see the detailed error then make sure your site is in dev mode (http://doc.silverstripe.org/debugging#dev_mode)
More info:
Folllowing your suggestion, and Uncle Cheese's "8 Common Silverstripe Errors" article, I set up the errors to be displayed, and also now get this when I click on the errant page in the CMS:
Notice: DataObjectDecorator::extraDBFields() is deprecated. Please use extraStatics() instead. in /srv/www/htdocs/eastern/sapphire/core/model/DataObjectDecorator.php on line 60 Fatal error: Class 'CalendarDateField' not found in /srv/www/htdocs/eastern/mysite/code/LocalJobPage.php on line 30
I changed CalendarDateField to DatePickerField, and, I have no idea why it worked this time and not before, but NOW the pages open in the CMS!! I thought I had changed this before, but I guess I didn't do it correctly.
But I'm still getting "Notice: DataObjectDecorator::extraDBFields() is deprecated. Please use extraStatics() instead. in /srv/www/htdocs/eastern/sapphire/core/model/DataObjectDecorator.php on line 60 "
What should I do about this?
Found it!!!! I did a search for "extraStatics() silverstripe" and the info on page http://doc.silverstripe.org/dataobjectdecorator led me to do a search in my site for any files containing the text "extends DataObjectDecorator", and I found the offending newletterRole.php file. Made the change to extraStatics() from extraDBFields(), and the error is gone!
Thanks so much for pointing me in the right direction!