Jump to:

5453 Posts in 1674 Topics by 1198 members

Customising the CMS

SilverStripe Forums » Customising the CMS » SS_Report gives error after updating to 2.4.9

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

Page: 1
Go to End
Author Topic: 430 Views
  • quanto
    Avatar
    Community Member
    79 Posts

    SS_Report gives error after updating to 2.4.9 Link to this post

    I have a custom SS_report form. It worked ok in SS 2.4.5, but after the upgrade it hangs after navigate or export to csv and gives the following error:

    ERROR [User Error]: Uncaught Exception: ModelAsController->getNestedController(): was not passed a URLSegment value. IN POST /admin/reports//EditForm/field/ReportContent?SecurityID=cce54850b5b4c306e7297843bb193e639c4f1786&ctf[ReportContent][start]=50 Line 87 in /home/***/domains/mydomain.nl/public_html/sapphire/core/control/ModelAsController.php Source ====== 78: } 79: 80: /** 81: * @return ContentController 82: */ 83: public function getNestedController() { 84: $request = $this->request; 85: 86: if(!$URLSegment = $request->param('URLSegment')) { * 87: throw new Exception('ModelAsController->getNestedController(): was not passed a URLSegment value.'); 88: } 89: 90: // Find page by link, regardless of current locale settings 91: Translatable::disable_locale_filter(); 92: $sitetree = DataObject::get_one( 93: 'SiteTree', Trace =====

    ModelAsController->getNestedController() line 64 of ModelAsController.php ModelAsController->handleRequest(SS_HTTPRequest) line 282 of Director.php Director::handleRequest(SS_HTTPRequest,Session) line 125 of Director.php Director::direct(/admin/reports//EditForm/field/ReportContent) line 127 of main.php

    It has something to do with te extra slash after reports (/admin/reports//EditForm/field/ReportContent), cause when I remove it, it will do the export to csv.

    My ss_report code:

    TipReport.php

    class CustomSideReport_Tipcompetitie extends SS_Report {
    function title() {
    return "Tipcompetitie";
    }
    function records() {
    return DataObject::get("TipcompetitieZend", "", "Kortebaan");
    }
    }

    in _config.php:

    SS_Report::register("ReportAdmin", "TipcompetitieReport", 20);

    Upgrading to 3.x is currently not an option. Anybody a solution?

  • quanto
    Avatar
    Community Member
    79 Posts

    Re: SS_Report gives error after updating to 2.4.9 Link to this post

    "Solved" it by a downgrade to 2.4.7.

  • KiGi
    Avatar
    Community Member
    1 Post

    Re: SS_Report gives error after updating to 2.4.9 Link to this post

    Hi quanto,

    I had a similar problem and by searching for an answer I stumbled upon your question.

    As I don't think it is a good idea to go back in versions (for security and other reasons) to solve a problem , I wanted to let you (and others who will read this) know that this bugfix helped me:

    https://github.com/silverstripe/silverstripe-framework/commit/fedb337

    By the way I used 2.4.10.

    Cheers,
    KiGi

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