Jump to:

23013 Posts in 11872 Topics by 2830 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: 2918 Views
  • okotoker
    Avatar
    Community Member
    39 Posts

    SS3 Gridfield "Not Found" Error Link to this post

    I have just moved a site from beta1 to beta3 and I am encountering issues with the Relation Editor that I didn't have before. If I have just opened or refreshed a page and then click on one of my items in the editor it opens just fine, but if I do not refresh the page and try to go back and view another item I get two popups that say "not found". Again if I refresh the page it works again.

    I tried just adding components instead of using the GridFieldConfig_RelationEditor and once I get that going and I click on a edit button I get two popups again that say "forbidden".

    Here is what I have. I included the two different ways I have tried, so both methods below are not used at the same time. I also have included setDisplayFields in the code below. However I have to remove this as well or I get a setDisplayFields is not available error.

    public static $has_many = array(
    'Lots'=>'Lot'
    );
          
          public function getCMSFields() {
             $f = parent::getCMSFields();
             
             $o = DataList::create('Lot');
             $config = new GridFieldConfig_RelationEditor();

    Or I tried using this
    $config = new GridFieldConfig();
             $config->addComponent(new GridFieldDataColumns());
             $config->addComponent(new GridFieldSortableHeader());
             $config->addComponent(new GridFieldPaginator());
             $config->addComponent(new GridFieldEditButton());

             $gridField = new GridField('Lots','Lots',$o,$config);
             
    $gridField->setDisplayFields(array(
              'ID' => 'ID',
              'Address' => 'Address'
             ));
             
             $f->addFieldToTab('Root.Main',$gridField);
             
             return $f;

    Thanks for any help.

  • Bolixe
    Avatar
    Community Member
    17 Posts

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

    Hi okotoker,

    I am upgrading my project to SS3 b3. I was using before the version 2.4.6 with the manymanycomplextablefield to manage the relationships. This is the last step to finish my upgrading.

    I was playing also with the "GridFieldConfig_RelationEditor" and I get the same error than you, after editing one then I get "not found" message. In addition there is noway to add/delete relations between the dataobjects something like checkbox or dropdown.

    I had a look in the core, "framework/forms/gridfield" for the classes in the files "GridFieldConfig.php and GridField.php" and everything look fine. It calls the right class but it doesn´t work properly like I said.

    I also saw the changelog of the beta3 about the grieldfield that will replace all the complextablefields and I do like they describe but still the same result.

    http://doc.silverstripe.org/sapphire/en/trunk/changelogs//3.0.0#tab-paths ( It is above of this paragraph about tabs )

    Then my conclusion is that could be there is a little bugs, but its normal is beta version still. Lets keep calm hehe

    Greetings

  • okotoker
    Avatar
    Community Member
    39 Posts

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

    Yeah strange enough I do have add edit and delete buttons using the RelationEditor unlike you. I have also encountered a problem with the drag and drop upload of images when adding or updating and item. I get error in red right next to the image that says "not found" as well. I can drag and drop in the files section and then use the "from files" button in the item to get the file to work.

    One other thing thats not an error ( I don't think ) but just seems odd is that the back button that appears at the top when in a item takes me back to my home page and not back to the page with my GridField. It did this in beta1 so I think its intentional.

    Like you said its is a beta. So I think I will just set this site aside until SS3 actually launches. I am loving the new system though. Good job Silverstripe team!

  • Bolixe
    Avatar
    Community Member
    17 Posts

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

    Good morning!

    When I use the RelationEditor I have add new entry, edit and delete buttons for each row as well.
    What I don´t get is the checkboxes or something like this to add or delete relationship between dataobjects.

    About the uploadfield I have not the same problem that you, it uploads fine but then I save and access again this entry and the images aren´t there, I have to add twice and it works. I don´t get this error next to image.
    Another thing is what you said, press back button and go back directly to the homepage, try to acces again one entry and get popup "not found".

    Despite of this, the rest is really good. I love the new system too, specially the improvements in the template system, and the interface is cool for the customers.

    Great job!!!

  • okotoker
    Avatar
    Community Member
    39 Posts

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

    The having to save the image after creating your new object is the same behaviour you get when using DataObjectManager in SS2. You would get a message in that case that would tell you that you needed to create the object before attaching an image. So I don't think this is a bug.

  • Bolixe
    Avatar
    Community Member
    17 Posts

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

    Hi,

    I start the morning with good news, I saw the SS3 RC1 is launched. I thought, I expected that the problem with the GridFieldConfig_RelationEditor to manage the relationships will be over. So I intalled it, but the result it is the same.

    I really wonder if I am doing something wrong. Also I wonder if somebody achieved this in SS3. I would like to present a project for a customer in SS 3 instead of SS 2.4.7. I think even in pay some money if somebody have done this and it is working properly.

    Thanks for any answer, greetings

  • okotoker
    Avatar
    Community Member
    39 Posts

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

    So I downloaded the RC and gave it a try. I didn't try to upgrade the site beta-3 that I am working on, that was having the problems I just created a test with just the basics for creating and using a grid field. Everything worked great. So I am thinking either the bug is gone or the more likely explanation I screwed something up upgrading from one beta to another.

    So I don't think the problem we were having is still there. I will report back once I get the beta-3 site upgraded.

  • okotoker
    Avatar
    Community Member
    39 Posts

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

    I can confim after upgrading from Beta 3 to RC 1 that the relation editor now works as expected on my site.

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