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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Unable to save ManyManyComplexTableField selections on new ModelAdmin controlled DataObject, until first save


Go to End


3 Posts   1524 Views

Avatar
phillprice

Community Member, 6 Posts

14 April 2011 at 9:01pm

Hello,
I’ve got a model admin setup in 2.4.0 (and 2.4.5) and an object (BeverageGroup) has a ManyManyComplexTableField to BeverageItem.

I’ve created a bunch of BeverageItems and go to create an BeverageGroup. I fill in the direct fields in BeverageGroup OK but when I check a few BeverageItems and click 'Add' the BeverageItems don’t stick.

I check them again and click 'Save' and they stick.

I’ve included a stripped down module which shows the issue.

Attached Files
Avatar
swaiba

Forum Moderator, 1899 Posts

18 April 2011 at 7:02am

Hi,

You are probably best using something like this...
http://www.silverstripe.org/multiselectfield-module/

here is some more...
http://www.silverstripe.org/customising-the-cms/show/15536

Avatar
phillprice

Community Member, 6 Posts

18 April 2011 at 8:19pm

Thanks Swaiba, however this looks to be a bug in the way the field works, unfortunately this module is not suitabel in this instance if I wish to keep the edit options available.

Since this post I've noticed in the datobject_manager module it shows a message stating that you can't make additions until the item is saved for the first time, and I believe unless my code is wrong, that this is a UI bug?