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.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

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

CommentAdmin::EditForm()


Reply

5 Posts   787 Views

Avatar
Parker1090

4 March 2013 at 11:24pm (Last edited: 4 March 2013 11:25pm), Community Member, 38 Posts

Hi All,
I downloaded a copy of SS 3.03, and trying to upgrade my site to this version.
I hit a few issues, which I've managed to get around, but now I'm stuck with this one, so any help will be massively appreciated!

[Strict Notice] Declaration of CommentAdmin::EditForm() should be compatible with that of LeftAndMain::EditForm()
GET /index.php/admin/pages
Line 318 in /xxxxx/xxxxx/cms/code/CommentAdmin.php

Cheers in advance

Avatar
frankmullenger

5 March 2013 at 10:32am Forum Moderator, 51 Posts

You probably need to add a parameter to your CommentAdmin::EditForm() declaration so it matches:
https://github.com/silverstripe/sapphire/blob/3.0/admin/code/LeftAndMain.php#L1003

So, adding $request=null should do it.

Avatar
Willr

5 March 2013 at 5:18pm Forum Moderator, 5511 Posts

Comments module has probably been kept up to date in align with 3.1 so try downloading the new 3.1 beta. You should use that or 3.0.5.

Avatar
Parker1090

8 March 2013 at 1:26am (Last edited: 8 March 2013 1:28am), Community Member, 38 Posts

Thanks both for the reply.

I've updated the files to the 3.0.5 version, but it still throws an error as it's trying to look for a file that don't exist...

[Warning] require_once(/public_html/cms/code/CommentAdmin.php): failed to open stream: No such file or directory
GET /admin/pages/edit/show/1
Line 82 in /public_html/framework/core/manifest/ClassLoader.php

Why would it be trying to look for the old file?

Trace

Trace
SS_ClassLoader::loadClass
ClassLoader.php:82
SS_ClassLoader->loadClass(CommentAdmin)
spl_autoload_call(CommentAdmin)
ReflectionClass->__construct(CommentAdmin)
CMSMenu.php:271
CMSMenu::get_cms_classes()
AdminRootController.php:40
AdminRootController::rules()
AdminRootController.php:83
AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:296
Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:119
Director::direct(/admin/pages/edit/show/1,DataModel)
main.php:126

Avatar
IOTI

13 March 2013 at 3:30am Community Member, 189 Posts

Did you try doing a ?flush=all after updating the files?