Hi,
I am following the tutorial for this module in the documentation. The DataObjectManager (Testimonial stuff) works fine. However, the next bit for the ResourcePage comes up with this error when adding a new page in the CMS:
ERROR [User Error]: getCMSFields returned null on a 'Page' object - it should return a FieldSet object. Perhaps you forgot to put a return statement at the end of your method?
IN POST /silverstripe/admin/getitem?ID=6&ajax=1
Line 392 in /home/adrianw/PROJECTS/sandbox/silverstripe/cms/code/CMSMain.php
Source
======
383:
384: public function getEditForm($id) {
385: $record = $this->getRecord($id);
386:
387: if($record) {
388: if($record->IsDeletedFromStage) $record->Status = _t('CMSMain.REMOVEDFD',"Removed from the draft
site");
389:
390: $fields = $record->getCMSFields($this);
391: if ($fields == null) {
* 392: user_error("getCMSFields returned null on a 'Page' object - it should return a FieldSet object.
Perhaps you forgot to put a return statement at the end of your method?", E_USER_ERROR);
393: }
394: $fields->push($idField = new HiddenField("ID"));
395: $fields->push($liveURLField = new HiddenField("LiveURLSegment"));
396: $fields->push($stageURLField = new HiddenField("StageURLSegment"));
397:
398: /*if( substr($record->ID, 0, 3 ) == 'new' )*/
<ul>user_error(getCMSFields returned null on a 'Page' object - it should return a FieldSet object. Perhaps you forgot to put a return statement at the end of your method?,256)
line 392 of CMSMain.php
CMSMain->getEditForm(6)
line 925 of LeftAndMain.php
LeftAndMain->EditForm()
line 380 of LeftAndMain.php
LeftAndMain->getitem(HTTPRequest)
line 162 of Controller.php
Controller->handleAction(HTTPRequest)
line 129 of RequestHandler.php
RequestHandler->handleRequest(HTTPRequest)
line 122 of Controller.php
Controller->handleRequest(HTTPRequest)
line 277 of Director.php
Director::handleRequest(HTTPRequest,Session)
line 121 of Director.php
Director::direct(/admin/getitem)
line 118 of main.php
</ul>
Can you help? I am using the latest version of Silverstripe (2.3.2)
Adrian