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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

UploadField: can't select filed uploaded through Files Tab


Go to End


8 Posts   2451 Views

Avatar
dendeffe

Community Member, 135 Posts

16 September 2012 at 9:28am

Hi,

when I click 'From Files'
http://www.evernote.com/shard/s217/sh/8636c9ce-d887-422b-b808-9508fa6bf0ad/d481cf0687002df50492b3c606ce09f4

I can't select any images I uploaded through the general 'Files' tab
http://www.evernote.com/shard/s217/sh/dfe78b4f-5f03-430e-8385-2c57afe59bda/bc265e4cb5f28524fd3de7a0bc658775

I think it's the same problem as this post:
http://www.silverstripe.org/general-questions/show/20721

Syncing the files doesn't help. I also tried upgrading to the latest 3.0.1 rc, but that didn't help either.

Avatar
dendeffe

Community Member, 135 Posts

17 September 2012 at 10:22am

I get the files that were added through the files tab now.

I i first removed the uploadfield and then added $upload_field->relationAutoSetting = false; to my getCMSFields,

However when I select a file now, it dissapears when I click save on the dataobject
http://www.evernote.com/shard/s217/sh/16b51d0b-522b-4d8b-8e7d-627442950c14/177ccb55c20f286b48e93d89a61996cc

http://www.evernote.com/shard/s217/sh/484671d5-feea-4de1-aa69-5fee98c796ef/9374fb72fe0670535b1e3e82e7ee6718

In UploadField, I think I'm getting an empty result from getItems when I try to add an existing image that wasn't added from the gridfield/relation.

Avatar
dendeffe

Community Member, 135 Posts

17 September 2012 at 5:03pm

What is weird is that the data saved to the DB, just not retrieved in the back end and front end.
Here is the code I'm currently using.
http://www.sspaste.com/paste/show/5056b2002bb11

Avatar
dendeffe

Community Member, 135 Posts

17 September 2012 at 6:26pm

OK, so attaching files only works if the file has class ExtraImage (which I use to do some custom cropping)

Avatar
dendeffe

Community Member, 135 Posts

17 September 2012 at 7:47pm

It works if I use the general 'Image' in 'Attachment'. Then, I can't add my custom resize functions, however.

I tried adding custom functions through DataExtension, but that doesn't seem to work either
http://www.sspaste.com/paste/show/5056da4d9271b

Avatar
blueskies

Community Member, 44 Posts

4 December 2012 at 10:46pm

I can verify with 3.0.3 I have the same issue. Images uploaded to folders are not shown when "from files" is chosen. No images are shown at all in any folder. Until I change the image class from WhateverSubClassImUsing_Image to plain Image. That makes me lose all resize options, as stated above.

I've also tried every sync possible, but to no avail. This is a showstopper bug for me.

Avatar
BenWu

Community Member, 97 Posts

11 December 2012 at 1:16am

I got nearly the same problem.

I extends UserDefinedForm (which is a page) so that I can add an image banner. When I clicked 'From File', the grid shows the wrong headings with

'Email', 'Email Subject'.

All the images in the Uploads folder are listed but I don't see the files names, they are all blank. The pagination still works. All i see just rows of blank information.

I think SS messed up when try to load the right objects.

Avatar
Polar Design

Community Member, 2 Posts

28 June 2013 at 1:55am

Any update on this bug? I'm experiencing the same exact issue. Hopefully some resolution or workaround has been found since you all reported it 6+ months ago...? Thanks in advance!!