Jump to:

23355 Posts in 17734 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » [Solved] ModelAdmin - Create and search buttons return 'Not Found'

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
Go to End
Author Topic: 848 Views
  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    [Solved] ModelAdmin - Create and search buttons return 'Not Found' Link to this post

    Hello,

    Started experimenting with ModelAdmin today--neat concept! Ran into difficulty with the create and search buttons that appear in the auto-created add/search/import panel. If I click on either of those buttons, a red "Not Found" error message is displayed at the bottom of the main CMS admin panel. Not good. If I add "Director::addRules(100, array('admin/quotes/$Class/$Action/$ID' => 'QuotesAdmin'));" to my module's _config.php and then click on create or search, the main panel shows the "welcome to SilverStripe now loading" screen.

    Would you have any clues as to what I need to do to get create and search working?

    I'm running the http://open.silverstripe.com/browser/modules/cms/branches/nestedurls code base on Apache 2.2 running on Win XP.

    Thank you,
    Ben

    -----------

    Code:

    <?
    class QuotesAdmin extends ModelAdmin {

    protected static $managed_models = array(
    'QuoteModel'
    );

    static $url_segment = 'quotes';
    static $menu_title = 'Quotes';

    }
    ?>

    <?
    class QuoteModel extends DataObject {
    static $db = array(
    'Quote' => 'Text',
    'Source' => 'Varchar',
    'Author' => 'Varchar'
    );
    static $searchable_fields = array(
    'Quote',
    'Source',
    'Author'
    );
    }
    ?>

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: [Solved] ModelAdmin - Create and search buttons return 'Not Found' Link to this post

    Actually, I was running http://svn.silverstripe.com/open/phpinstaller/branches/nestedurls/.

    At any rate, the problem ended up being the fact that there were some changes to trunk that hadn't been ported over to nestedurls, for my problem went away when I switched to trunk.

    Have a great day,
    Ben

    848 Views
Page: 1
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.