7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » attn uncle cheese - dataObjectManager bug?
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 3744 Views |
-
attn uncle cheese - dataObjectManager bug?

5 May 2009 at 7:08am
UncleCheese et all:
For some reason I can't get one of my dataobjectmanager to drag and drop. When I hit the checkbox, and hover over the items, it shows the cursor as if it wants to reorder - but they just stay stuck. All of the other dataObjectManager items on this site are sortable - just not this one!
Any ideas what might be going on?
I have this in _config.php:
SortableDataObject::add_sortable_class('RelatedLink');
And here is RelatedLink.php
<?php
class RelatedLink extends DataObject
{
static $db = array (
'Title' => 'Text',
'Address' => 'Text'
);
static $has_one = array (
'Page' => 'Page'
);
public function getCMSFields_forPopup()
{
return new FieldSet(
new TextField('Title'),
new TextField('Address')
);
}
}
?>And the part in Page.php
$fields->addFieldToTab("Root.Content.RelatedLink", new DataObjectManager(
$this,
'RelatedLinks',
'RelatedLink',
array('Title' => 'Title','Address'=>'Address'),
'getCMSFields_forPopup'
)); -
Re: attn uncle cheese - dataObjectManager bug?

5 May 2009 at 8:21am
Dude, I've got no idea. If you're getting the move cursor, it means the interface has refreshed properly and it has applied the sort controls. Weird that others are working. Have you tried different browsers? Any javascript errors?
-
Re: attn uncle cheese - dataObjectManager bug?

2 July 2009 at 12:47am
G'day Uncle Cheese,
Have the exact same issue here.
_config.php
...
SortableDataObject::add_sortable_classes(array('Characteristic','Reference','Photo'));
...Characteristic.php
<?php
class Characteristic extends DataObject
{
static $db = array (
'Label' => 'Text',
'Value' => 'Text'
);
static $has_one = array (
'DesignDetailsPage' => 'DesignDetailsPage'
);
public function getCMSFields_forPopup()
{
return new FieldSet(
new TextField('Label',"Label (example: 'Length over all')"),
new TextField('Value',"Value (example: '45.50 m')")
);
}function PrincipalCharacteristics() {
if ($this->iteratorPos < 4) {
return true;
}
}}
class Characteristic_Controller extends ContentController {
}?>
DesignDetailsPage.php
...
static $has_many = array(
'Characteristics' => 'Characteristic',
'References' => 'Reference',
'Photos' => 'Photo'
);
...
$manager2 = new DataObjectManager(
$this, // Controller
'Characteristics', // Source name
'Characteristic', // Source class
array(
'Label' => 'Label',
'Value' => 'Value'
), // Headings
'getCMSFields_forPopup' // Detail fields (function name or FieldSet object)
// Filter clause
// Sort clause
// Join clause
);$fields->addFieldToTab('Root.Content.Characteristics', $manager2);
...I'm sure this worked when I was developing the site, but currently (customer is already using CMS) drag&drop doesn't work anymore in none of the DOM-pages (in my case: Characteristics and Clients). Strange thing is that drag&drop does work on my ImageDOM (Photos). Tested in FF en IE7 and didn't work in both browsers.
Installed modules: userforms, cmsworkflow, swfupload, dataobjectmanager. SS version 2.3.1.
-
Re: attn uncle cheese - dataObjectManager bug?

7 July 2009 at 7:52pm
Anything uncle cheese? I just cant' find out what's going wrong, but drag&drop is still not working... Pls help
-
Re: attn uncle cheese - dataObjectManager bug?

8 July 2009 at 1:25am Last edited: 8 July 2009 1:25am
I can't replicate the issue, so it's really hard for me to troubleshoot. I have almost 20 production sites running DOM instances and none of them have ever reported this problem, so it's clearly an edge case. If you can figure out what causes it, please let me know and I'll test and fix, but with nothing to go on, I really can't sink time into investigating the problem.
Edit: You are on the latest SVN, correct? And SS 2.3.2?
-
Re: attn uncle cheese - dataObjectManager bug?

8 July 2009 at 1:45am
Thanks for your reply uncle cheese. Am not on latest svn and site has gone live with SS 2.3.1. Do you think getting the latest version of DOM could solve the issue? I'll go and try that later this week, thanks.
-
Re: attn uncle cheese - dataObjectManager bug?

8 July 2009 at 1:50am
Also, do you have more than one DOM instance on a page? e.g., on different tabs?
-
Re: attn uncle cheese - dataObjectManager bug?

8 July 2009 at 1:58am
Yes, I have three different tabs. Two normal DOMs and one ImageDOM.
| 3744 Views | ||
| Go to Top | Next > |


