Jump to:

3431 Posts in 1058 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Insert Image Quirk

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

Page: 1
Go to End
Author Topic: 1693 Views
  • jam13
    Avatar
    121 Posts

    Insert Image Quirk Link to this post

    Just spent a couple of hours fixing a weird problem with inserting images that I thought others might find useful as I couldn't find a solution anywhere else.

    Problem:

    When trying to insert an image into the content field (tinymce), selecting the folder in the Image sidebar doesn't show the thumbnails - instead it just stays showing "(Choose a folder or search above)".

    Solution:

    Don't create a has_one relationship on your pages called Image ($has_one = array('Image'=>'Image')). The resulting ID clashes with the Image sidebar and so breaks the select javascript.

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: Insert Image Quirk Link to this post

    What I find odd is that this hasn't been causing troubles before, because I've seen it many times before just as has_one 'Image'->'Image' _without_ causing any problems.

    So I wonder if there has been a change recently resulting in this.

  • jam13
    Avatar
    121 Posts

    Re: Insert Image Quirk Link to this post

    It is odd I agree, I'm pretty sure I've used relationships called Image before without side effects.

    There are a number of other unsolved forum posts that seem to describe a similar problem though.

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