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?