Jump to:

1135 Posts in 1984 Topics by 403 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » CommentAdmin::EditForm()

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: 707 Views
  • Parker1090
    Avatar
    Community Member
    38 Posts

    CommentAdmin::EditForm() Link to this post

    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

  • frankmullenger
    Avatar
    Forum Moderator
    51 Posts

    Re: CommentAdmin::EditForm() Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: CommentAdmin::EditForm() Link to this post

    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.

  • Parker1090
    Avatar
    Community Member
    38 Posts

    Re: CommentAdmin::EditForm() Link to this post

    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

  • IOTI
    Avatar
    Community Member
    187 Posts

    Re: CommentAdmin::EditForm() Link to this post

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

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