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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

ImageGallery uploads to wrong folder on edit then when record saved image disappears


Go to End


5 Posts   1509 Views

Avatar
CodeGuerrilla

Community Member, 105 Posts

9 April 2010 at 6:34pm

Edited: 09/04/2010 7:09pm

Am using the latest versions of DOM, ImageGallery and SWFUpload for one of our client sites was working fine until they decided to edit some gallery items and replace the image seems to work but when you save the database record the image disappears.

After a lot of investigation we found that when adding images the images are saved in:

assets/image-gallery/<page-name>/<album_name>

When editing an existing image selecting an existing image works, but when uploading a new one through the FileIFrameField it uploads the image to:

assets/Uploads

When you save the record it sets it back to:

assets/image-gallery/<page-name>/<album_name>

Has anyone else experienced this can this be related to the infamous bug:

http://www.silverstripe.org/customising-the-cms/show/276189#post276189

http://www.silverstripe.org/customising-the-cms/show/275888#post275888

http://www.silverstripe.org/archive/show/60837#post60837

http://www.silverstripe.org/archive/show/64965#post64965

I know there are way more posts on this subject if you find any please post here.

Avatar
creatormarius

Community Member, 11 Posts

19 May 2010 at 6:55pm

Same here. Any luck patching this. I'm digging through the code now....

Avatar
CodeGuerrilla

Community Member, 105 Posts

19 May 2010 at 7:26pm

No luck on this one, was pretty reluctant to debug the modules really haven't had the time, we convinced the client to live with it just don't edit an existing image by uploading over top of it :)

Avatar
UncleCheese

Forum Moderator, 4102 Posts

20 May 2010 at 1:53am

Yeah, that's a major drag. AFAIK, the ImageField doesn't give you control over where a file saves the way that a DOM does. I'm not sure if that's been updated in 2.4, but it would be really nice to have that option.

Avatar
creatormarius

Community Member, 11 Posts

23 May 2010 at 5:46pm

There's a way...

either hack core (for now....)

or extend Image_Uploader controller.

see post : http://www.silverstripe.org/all-other-modules/show/266319