Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Many_many saving problems: bug or my code?

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

Page: 1
Go to End
Author Topic: 1059 Views
  • SilverRay
    Avatar
    Community Member
    167 Posts

    Many_many saving problems: bug or my code? Link to this post

    Hi all,

    The following is kind of driving me nuts! I thought this to be gone in 2.3 rc2 but it is still there. However it is probably my code. Because I have to post code from three files, I will use pastie, otherwise this post will get too long.

    I have two dataobjects: NormalColor.php (see here) and ProductStyle.php (see here. I use them in a many_many relationship on ProductPage.php, here. This seems to work. But not always. In the CMS, when I click on the checkboxes in the tablefields, sometimes it is not saved in the database. Or some are saved. It varies. I had this problem with earlier versions of Silverstripe as well. It feels like it is some problem with the javascript for the complex table field (on the CMS side in the browser I mean), but I'm not sure. Perhaps it is something weird in my code. It happens even with a clean install of the CMS. Needless to say, this can be a challenge for a client using the admin interface. Anybody experiencing this also? Does my code need fixing?

    Help much appreciated, thanks!

    Ray.

  • SilverRay
    Avatar
    Community Member
    167 Posts

    Re: Many_many saving problems: bug or my code? Link to this post

    Update: problem improves when I reload the flushed CMS (with admin?flush=1) every time *before* I make and save a change in either table... improves, but not 100% of the time...

    1059 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.