Jump to:

3431 Posts in 1058 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Datamodel and version 2.4.2

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

Page: 1
Go to End
Author Topic: 1047 Views
  • jseth
    Avatar
    Community Member
    98 Posts

    Datamodel and version 2.4.2 Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Datamodel and version 2.4.2 Link to this post

    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)

  • jseth
    Avatar
    Community Member
    98 Posts

    Re: Datamodel and version 2.4.2 Link to this post

    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?

  • jseth
    Avatar
    Community Member
    98 Posts

    Re: Datamodel and version 2.4.2 Link to this post

    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!

    1047 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.