Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DOM + ImageDOM breaks drag and drop reordering on DOM

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: 1660 Views
  • Aram
    Avatar
    Community Member
    598 Posts

    DOM + ImageDOM breaks drag and drop reordering on DOM Link to this post

    Hi Uncle Cheese

    I appear to have found a strange bug whereby if you use an image DOM and a normal DOM on the same page, the drag and drop reordering on the normal DOM does not work. As soon as I change the ImageDOM to a FileDOM it then the normal DOMs re-ordering starts working.

    When I say it doesnt work, you can check the box and as you hover over the items you get the multi directional arrow, but when you try to drag them it does nothing. I assume it must be a JS conflict of some sort?

    What is strange is that I am also running the image gallery which has a normal DOM for albums and a ImageDOM for images yes seems to work fine....

    Many thanks

    Aram

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: DOM + ImageDOM breaks drag and drop reordering on DOM Link to this post

    I also ran into this problem again today. Situation:

    Page.php with ImageDOM
    HomePage.php extends Page.php and adds DOM

    SortableDataObject::add_sortable_class('Photo'); in _config.php
    SortableDataObject::add_sortable_class('HomePageLink'); in _config.php

    Now with this setup I was not able to reorder the DOM on the HomePage page type.

    Solution (work-around):

    I removed the ImageDOM in Homepage.php:

    $fields->removeByName("Images");

    Now I was able to reorder the DOM on the HomePage page type.

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: DOM + ImageDOM breaks drag and drop reordering on DOM Link to this post

    Found solution. Drag-and-drop ONLY seems to break if ImageDOM tab is added before DOM tab. If ImageDOM is added after normal DOM everything seems to work fine:

    public function getCMSFields() {
    $fields = parent::getCMSFields();

    // Add DOM tab

    // Add ImageDOM tab

    return $fields;
    }

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM + ImageDOM breaks drag and drop reordering on DOM Link to this post

    This was fixed a few revs ago. See "OMG New Stuff" thread.

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: DOM + ImageDOM breaks drag and drop reordering on DOM Link to this post

    Ok, use latest version now. Many_many thanks!

    1660 Views
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.