Jump to:

23472 Posts in 18941 Topics by 2878 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: 3237 Views
  • thi3r
    Avatar
    Community Member
    25 Posts

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

    bb-drummer, I don't think your problem is related to the error in this topic but here are a few details that might help.

    You don't really need to define an 'ID' field and index on your DataObject since this is created automatically.

    These don't seem necessary unless they are adding new fields to the dataobject

    class Bereiche1Mitglieder extends BereicheMitglieder {}
    class Bereiche2Mitglieder extends BereicheMitglieder {}
    class Bereiche3Mitglieder extends BereicheMitglieder {}


    then you can just use:

    public static $has_many = array(
    "Bereich1Mitglieders" => "BereicheMitglieder",
    "Bereich2Mitglieders" => "BereicheMitglieder",
    "Bereich3Mitglieders" => "BereicheMitglieder"
    );

    on your DataObject also you could maybe just use:

    static $has_one = array(
    "BereicheMitgliederPage" => "BereicheMitgliederPage"
    );

    on your page object, you probably don't need these line too:

    $itemsInGrid1 = DataList::create('Bereiche1Mitglieder');
    $itemsInGrid2 = DataList::create('Bereiche2Mitglieder');
    $itemsInGrid3 = DataList::create('Bereiche3Mitglieder');

    try this and see how it goes. Also would be good if you could give us more details on the error returned.

  • bb-drummer
    Avatar
    Community Member
    13 Posts

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

    hello thi3r,

    thanks for your reply...

    with those changes it is not possible to add or delete a record anymore, too (that's why i had those 3 xtra extensions of the DataObject (aka BereicheMitglieder, with those it worked). Also, all record now show up in every of the 3 Bereiche{n}Mitglieder 'groups'...

    the error i get is similar to the one in the beginning of this thread:
    a message "not found" pops up and in (chrome's) network inspector the result of the corresponding request is "I can't handle sub-URLs of a Form object."

  • bb-drummer
    Avatar
    Community Member
    13 Posts

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

    hello thi3r,

    finally, your hints did the trick... i initially forgot to remove the xtra 'ID' field... and i re-added the extended 'data-objects' (to have those 3 separated 'groups')...

    thanks a lot for your help

    YT
    BB

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