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.

General Questions

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

*** Solved *** 2.4.9 ImageDataObjectManage


2 Posts   257 Views


15 February 2013 at 12:28am (Last edited: 15 February 2013 12:32am), Community Member, 49 Posts


ImageDataObjectManage used to work on other sites, but on a new site using 2.4.9 and the same dataobject manager adding this code generates an error in the CMS

      $fields->addFieldToTab('Root.Content.Images', new ImageDataObjectManager(
            array('Title'=>'Title', 'Image'=>'Image')

Obviousely I have:

   static $has_many = array(

Is there a workaround?


15 February 2013 at 1:01am Community Member, 49 Posts

I needed to add the data object for my gallery photos


class Photo extends DataObject {
   static $db = array(
      'Title' => 'Varchar(128)'
   static $has_one = array(