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

[Resolved] Possible Bugs


Reply

6 Posts   727 Views

Avatar
JoshuaLewis

3 September 2009 at 7:53pm (Last edited: 4 September 2009 1:05am), Community Member, 76 Posts

I've had 2 problems with DataObjectManager and wanted to make sure they hadn't been dealt with before making a bug report.

I described my setup and attached my classes in this thread - http://silverstripe.org/general-questions/show/267361

1. I associate products with a particular page by clicking their check boxes and then clicking 'save and publish'. This enters the association into the correct database table and all of the files show up on the front of the site like they should. The problem is that when I leave that page in the cms and then come back none of the dataobjects are checked and if I click 'save and publish' all of those now unchecked dataobjects are disassociated with that page removing them from the database table and the front of the site.

2. When I try to search my list of dataobjets it starts searching before I have finished typing and then refreshes the search field with an incomplete query, even if I had typed more after it started but before the refresh. I can't enter more than 4 or 5 characters before the auto search starts.

Edit - Dio5 on IRC just pointed me to http://open.silverstripe.com/ticket/4250 and I'm about to upgrade my local version of the module from r244 to r253

Avatar
UncleCheese

3 September 2009 at 8:55pm 4085 Posts

The first problem sounds like you've got your model set up wrong. Post your code for that page and its related dataobject.

Someone else exposed the search issue recently, and I've made some tweaks to it that I'll be checking in soon.

Avatar
JoshuaLewis

3 September 2009 at 10:09pm Community Member, 76 Posts

Thank you. The code attached to the end of that thread I linked to is up to date. I'm not getting a form to attach anything on this thread.

I'll start looking at my models again to see if I can spot whats wrong.

Avatar
JoshuaLewis

4 September 2009 at 1:05am Community Member, 76 Posts

Thanks again. I found the lines of code that were causing the problem and have removed them.

Is there a ticket for that search field issue that I can follow?

Avatar
UncleCheese

4 September 2009 at 8:15am 4085 Posts

You can update the dataobject_manager/javascript/dataobject_manager.js file and tune the search latency to your liking. I'm a fast typist, so I had it around 200ms, but others seem to like it in the 500 range or so, so I'm probably going to check in a version of the file with it set to that value. The line is #144

            },200)

you can change the 200 to a different value. Just understand that if it's anything other than 500, you'll have to reapply the change it every time a new version comes out. :)

Avatar
JoshuaLewis

4 September 2009 at 9:58am Community Member, 76 Posts

Thank you.