Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

Undefined Action on Create - SS 2.4.11


Reply


379 Views

Avatar
dylangrech92

Community Member, 17 Posts

29 August 2013 at 9:26pm

I have a simple Product ModelAdmin:

class ProductAdmin extends ModelAdmin{
   static $managed_models = array('Product','ProductTopList');
   static $url_segment = 'products';
   static $menu_title = 'Products';
}

and a very simple product DataObject:
class Product extends DataObject{
   static $db = array(
      'Name' => 'Text',
      'WebAddress' => 'Text'
   );
}

Silverstripe in general is behaving very weird and by this I mean when I edit/create page I have to reload the admin to view the changes, but in the product it's even worse because it doesn't create the product. Here is the url that is being sent by ss on create:
"http://exam1/undefined?action_doCreate=Add".