Jump to:

7938 Posts in 1540 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » 404 On custom leftandmain extension

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1053 Views
  • UndefinedOffset
    Avatar
    Community Member
    27 Posts

    404 On custom leftandmain extension Link to this post

    I'm trying to use dataobjectmanager on a custom leftandmain extension so I can have like a global settings page. But when I try and add an item to the dataobjectmanager the dialog pops up and shows a file not found error. When I put some debug code in the method that generates the form for the popup that renders so I know its not a true 404 error. When I look at the url of the popup it shows http://localhost/silverstripe/admin/settings/regionManagment/field/Regions/add. Which looks correct to me other than that it has the /settings/ it's the same as the ones that I use on the content pages.

    Anyone have any ideas or know of a fix for this problem?

  • UncleCheese
    Avatar
    4085 Posts

    Re: 404 On custom leftandmain extension Link to this post

    The proper format for the URL should be:

    /admin/[ModelName]/[ParentObjectClass]/[ParentObjectID]/EditForm/field/[RelationName]/add

    You're missing a few things there.

    I usually just do Globals in ModelAdmin. You can enforce singularity with the canCreate() function and use javascript to just edit the only record. I also use static methods in the Globals class to get values, e.g. Globals::get('HomeImageID');

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