7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » 404 On custom leftandmain extension
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 945 Views |
-
404 On custom leftandmain extension

10 November 2009 at 8:34am
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?
-
Re: 404 On custom leftandmain extension

10 November 2009 at 9:00am
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');
| 945 Views | ||
|
Page:
1
|
Go to Top |

