Jump to:

1160 Posts in 2621 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » SilverStripe 3 DataExtension

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 2348 Views
  • El Kaz
    Avatar
    Community Member
    2 Posts

    SilverStripe 3 DataExtension Link to this post

    Hi,

    I have recently upgraded to SilverStripe 3 and have attempted to convert current SiteConfig extensions to the new DataExtension model however now that SS is using strict mode, whilst in dev mode the following error occurs

    Strict Standards: Declaration of UserConfig::updateCMSFields() should be compatible with that of DataExtension::updateCMSFields() in mysite\code\Users\UserConfig.php on line 27

    The extension is actually working and the fields are being added to the settings area but it won't allow me to edit other pages within the CMS (the above error is dumped when clicking on a page in the pages section).

    doc.silverstripe.org/framework/en/trunk/howto/extend-cms-interface Judging by this example I am doing everything correctly and even while leaving the updateCMSFields function completely blank it still dumps this error.

    public function updateCMSFields(&$fields) {
    }

    Has anyone come across this issue and resolved it?

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: SilverStripe 3 DataExtension Link to this post

    Looks like that documentation is out of date. It should match https://github.com/silverstripe/sapphire/blob/master/model/DataExtension.php#L159 (that is what strict mode is complaining about)

  • El Kaz
    Avatar
    Community Member
    2 Posts

    Re: SilverStripe 3 DataExtension Link to this post

    Thanks for the reply Will.

    I have tried copying the function from DataExtension (the version within my framework folder) and pasting it into my extended class and still get the compatibility error which is quite strange.

    Is there any updated versions of SilverStripe I can try? Or is http://www.silverstripe.org/stable-download the latest?

  • Blackdog
    Avatar
    Community Member
    156 Posts

    Re: SilverStripe 3 DataExtension Link to this post

    Try this

          function updateCMSFields(FieldList $fields)
          {   

          }

    2348 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.