Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Manage Object with multiple images with IDOM

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: 990 Views
  • micahsheets
    Community Member
    164 Posts

    Manage Object with multiple images with IDOM Link to this post

    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.

  • UncleCheese
    4085 Posts

    Re: Manage Object with multiple images with IDOM Link to this post

    Have you tried just using Uploadify fields for those?

    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

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.