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

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

SilverStripe 3 DataExtension


Go to End


4 Posts   4299 Views

Avatar
El Kaz

Community Member, 2 Posts

15 July 2012 at 4:42pm

Edited: 15/07/2012 4:43pm

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?

Avatar
Willr

Forum Moderator, 5523 Posts

15 July 2012 at 5:21pm

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)

Avatar
El Kaz

Community Member, 2 Posts

16 July 2012 at 10:31am

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?

Avatar
Blackdog

Community Member, 156 Posts

20 July 2012 at 1:49am

Try this

function updateCMSFields(FieldList $fields)
{

}