21298 Posts in 5735 Topics by 2603 members
| Go to End | Next > | |
| Author | Topic: | 2057 Views |
-
Re: SS3 Gridfield "Not Found" Error

20 June 2012 at 1:31am Last edited: 20 June 2012 1:33am
Hi,
thanks for your answer this are good news! At least I know is my mistake.
I did more or less the same. I create a class Program as a Page and Module as a DataObject, the relation is many_many. But I get the same, I open pages then Program and go to the tab Modules, there I have the table with all the modules I added from the dataobject, but there is noway to link then in a relationship, checkbox that will insert the relation in the table Program_Modules.
******** Program.php *********
class Program extends Page {
static $many_many = array(
'Modules' => 'Module'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$dList = DataList::create('Module');
$gridFieldConfig = GridFieldConfig_RelationEditor::create();$gridFieldConfig->getComponentByType('GridFieldAddExistingAutocompleter')->setSearchFields('Name');
$gridField = new GridField('Modules', 'Modules', $dList, $gridFieldConfig);
$fields->addFieldToTab( 'Root.Content.Modules', $gridField);
return $fields;
}
}class Program_Controller extends Page_Controller {
}******** Modules.php **********
class Module extends DataObject {
static $db = array(
'Name' => 'Text'
);
static $belongs_many_many = array(
'Programs' => 'Program'
);
static $summary_fields = array(
'Name' => 'Name'
);
}I will be really gratefull if you Could you explain where I fail and how you do, please. Greetings
-
Re: SS3 Gridfield "Not Found" Error

25 June 2012 at 9:53pm
No?? anybody did it??
Any help will be athanked
-
Re: SS3 Gridfield "Not Found" Error

26 June 2012 at 9:06am
You need to pass the RelationList to the GridField, not just a DataList. So you want
$dList = $this->Modules();
-
Re: SS3 Gridfield "Not Found" Error

27 June 2012 at 7:55pm
Same problem here on SS3 RC2. UploadField was working for some time, but now when I try to upload image "Not Found" appears. There is also problem with selecting image from cms files, no files are found in "Uploads" directory.
-
Re: SS3 Gridfield "Not Found" Error

28 June 2012 at 12:57am
Same upload problem continues with fresh RC3 too. Tried on two different servers with php 5.3 and 5.4
-
Re: SS3 Gridfield "Not Found" Error

28 June 2012 at 3:32am
I haven't been doing exactly the same as Bolixe. I have just been using a simple has_one relation with the GridFieldConfig_RelationEditor. I originally had the not found problem but since moving to beta 3 everything has been fine through rc2.
I don't know if this had anything to do with it but when I was having the problem, I originally upgraded by just moving in the new cms and framework folders. Since my first install to b2 broke, just to make sure I wasn't missing anything I dragged in and replaced everything but mysite and themes folders.
Everything has been good since then.
-
Re: SS3 Gridfield "Not Found" Error

9 July 2012 at 9:14pm
I do have exactly the same problem in SS 3.0.0 stable. I'm using a very simple DataObject code:
<?php
class FotoItem extends DataObject {public static $db = array(
'Titel' => 'Varchar'
);public static $has_one = array(
'FotoPagina'=>'FotoPagina',
'Foto'=>'Image'
);public function getCMSFields_forPopup() {
$fields = new FieldList();
$fields->push( new UploadField('Foto', 'Foto\'s'));
return $fields;
}
}Anybody else facing this problem?
-
Re: SS3 Gridfield "Not Found" Error

10 July 2012 at 12:38am
GridField uses getCMSFields, not getCMSFields_forPopup.
| 2057 Views | ||
| Go to Top | Next > |




