Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » SS3 Gridfield "Not Found" Error

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2 3 4
Go to End
Author Topic: 3152 Views
  • Bolixe
    Avatar
    Community Member
    17 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    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

  • Bolixe
    Avatar
    Community Member
    17 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    No?? anybody did it??

    Any help will be athanked

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    You need to pass the RelationList to the GridField, not just a DataList. So you want

    $dList = $this->Modules();

  • shmayek
    Avatar
    Community Member
    3 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    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.

  • priithansen
    Avatar
    Community Member
    25 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    Same upload problem continues with fresh RC3 too. Tried on two different servers with php 5.3 and 5.4

  • okotoker
    Avatar
    Community Member
    41 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    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.

  • quanto
    Avatar
    Community Member
    81 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    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?

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: SS3 Gridfield "Not Found" Error Link to this post

    GridField uses getCMSFields, not getCMSFields_forPopup.

    3152 Views
Page: 1 2 3 4
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.