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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Manage Object with multiple images with IDOM


2 Posts   1007 Views


20 June 2011 at 5:12pm (Last edited: 20 June 2011 5:17pm), Community Member, 164 Posts

I have done this in the past with other versions of SS and DOM but for some reason SS2.4.5 and most current DOM won't work for me.

I have a DataObject that has a full size image and two other thumbnails attached as $has_one relationships. IDOM is used to add the full size image and after the image upload I am presented with the usual interface to further edit the DataObject. Now in this interface I have two ImageFields to upload the two thumbnails. However when I try to attach the thumbnail images I get an error

The code line in question is $this->form->getRecord()->write();

I do now know which record getRecord() refers to here. But I assume that it is not getting the DataObject that it is supposed to attach the image to. If I look at the database I do see that the DataObject is there and is correct.

If I just hit save without attaching the thumbnails and then click on the image in IDOM I can then use the interface normally to add the thumbnails without getting the error.


21 June 2011 at 4:38am 4085 Posts

Have you tried just using Uploadify fields for those?

SilverStripe tips, tutorials, screencasts and more: