Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Bug Reports

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Go to End
Author Topic: 44649 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    I'll take a look at it.. I'm wondering, however, why you wouldn't just use a CheckboxSetField or MultiSelectField to create that relationship. If products are already managed in ModelAdmin, why create multiple workflows for creating them? The DOM seems like overkill in this case.

  • andy_steel
    Avatar
    Community Member
    31 Posts

    Re: Bug Reports Link to this post

    Thanks for the tip about MultiSelectField.

    I wanted to pick a solution that makes it easy to select a few dataobjects out of hundreds.

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: Bug Reports Link to this post

    SimpleHTMLEditorfield: produces something like this:

    <div><div>paragraph1</div><div><br></div><div>paragraph2</div></div>

    - <br> should be <br /> if I am using some form of xhtml. I could not find a switch to change this behavior.
    - for some reason br is encapsulated by div, this makes the code less clean
    - Sometimes text does and sometimes text does not get encapsulated by div(s). I think it would be better to encapsulate it in p, and make this standard behavior (so you know what to expect in the output).

    I consider this a bug, but people might disagree of course

    I have now switched to SimpleTinyMCEField because it did not have any of these issues.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    Yeah, SimpleTinyMCE is the way to go. Those other two tools are fairly immature.

  • Andrew Houle
    Avatar
    Community Member
    132 Posts

    Re: Bug Reports Link to this post

    I have a nested FiledDataObject manager. Everything behaves ok, but the name under the file pulls the ID and not the caption that I want. This is my code:

    new FileDataObjectManager(
    $this,
    'ImageFiles',
    'ImageFile',
    'Photo',
    array('Caption'=>'Caption')
    )

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    Use setGridLabelField($fieldName);

  • Andrew Houle
    Avatar
    Community Member
    132 Posts

    Re: Bug Reports Link to this post

    Thanks!

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Bug Reports Link to this post

    Hey UncleCheese
    While working with the DOM we found a bug with modifying permissions on a DOM instance.
    The culprit is the removePermission method where it's impossible to remove the "add" permission. The root of the problem is that you're not checking the array key with strict typing, so that array key 0 equals false!

    Here you'll find a patch that fixes the issue:
    http://bummzack.ch/misc/dataobjectmanager_add.patch

    44649 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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.