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

Insert Image Quirk


Go to End


3 Posts   2912 Views

Avatar
jam13

121 Posts

19 November 2009 at 6:17am

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.

Avatar
dio5

Community Member, 501 Posts

19 November 2009 at 7:11am

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.

Avatar
jam13

121 Posts

19 November 2009 at 8:16am

Edited: 19/11/2009 8:17am

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.