Problems with image picker

Topics: Installing Orchard
May 2, 2011 at 6:59 PM

Hi,

I installed 1.1 with the Web Platform Installer on Windows 7 today.

I set it up to use SQL Server Compact and the Default Orchard Recipe. Everything seemed to go fine.

I then started following the ‘Building Your First Orchard Site’ walkthrough, but had problems with the Image Picker in the Edit Widget dialog. Specifically, when I navigate to an image, and hit upload, nothing seems to happen – nothing appears in the preview panel and the image doesn't appear in any of the Orchard folders.

Has anyone else had this problem?

Thanks,

Paul

 

Coordinator
May 2, 2011 at 7:33 PM

Hi -- can you be more specific about what actions you're taking? It's unclear whether you're trying to upload an image from your computer or choose an existing image that is already in the media library.

May 2, 2011 at 7:48 PM

Hi - I'm trying to upload an image from my computer - it's one of the sample pictures that comes with Win 7. In fact, it's the tulips picture that is used in the walkthrough here: http://orchardproject.net/docs/Getting-Started.ashx

Coordinator
May 2, 2011 at 9:06 PM

Hard to say what is going wrong. Normally if the upload failed for some reason, there'd be at least an alert box with an error message. You are seeing nothing at all, so either the upload isn't even starting, the upload is taking a long long time for some other reason, or there is an error but the error message isn't showing up. If there were an error it would show up in the logs, so you could check there (the logs are written under the App_Data folder).

When you choose the image from your computer and then click upload, does the UI in the browser at least show you that a file has been selected for uploading? Like "c:\fakepath\tulips.png"?

May 2, 2011 at 9:20 PM

Yes, the textbox in the UI does show the selected image, and a green 'uploading' bar appears for a moment, but then nothing.

I've looked in the logs, and sure enough there are a lot of errors there, but they're all blank - no text in them at all.

Coordinator
May 2, 2011 at 11:25 PM

One thing to check for is that the Media directory has write access enabled, that's where the files will end up, so the system needs to be able to write files there. Same goes for the app_data directory. Try using other features of the site like editing content, installing modules, etc, to see if you get any other errors that might help make the problem more obvious.

May 3, 2011 at 9:30 PM

I'm sure you're right, it must be some sort of permissions thing. I can use other features such as editing text or installing a theme no problem at all. I guess I'll just have to bang my head against Windows permissions for a while. Sigh.

 

May 3, 2011 at 11:07 PM

Paul, Are you sing IE9?  If so, it may be a problem with IE9 and TinyMVC. 

If you're using IE9, Try enabling IE8 rendering mode by using IE Developer tools (F12) and then clicking the menu item that says Broser Mode IE9, and selecting Internet Explorer 8.  Then try to upload the image.  If that works, then it's definitely an IE9 problem.

May 4, 2011 at 7:06 AM

Thanks Mystere, but that wasn't it either. It's the same problem with IE9, IE8, and Firefox.

But I did notice that my theme (Metal Dark Gray) looks blue in IE!

May 10, 2011 at 8:01 AM

Same problem here with 1.1.3.0. Tried FF4, Chrome, IE9. Nothing works on upload page, find a workaround : Create folder in media library and upload an image there.

May 10, 2011 at 8:11 PM

Hi TPAKTOP,

Glad to hear I'm not the only one with this problem.

May 18, 2011 at 1:51 PM

Hello,

I'm having the same problem.

The app is deployed on windows azure. The media picker, starts the "loading/uploading green bar" after pressing the upload button but nothing happens.

 

May 18, 2011 at 5:51 PM

This is pretty weird.  I'm getting very odd behavior when using the 1.1.30 "release" download (i.e. not the full source download).  My media folder has full access permissions granted to "Everyone".  I am able to upload images via the "Media" module.  The couple weird behaviors I'm noticing are both on the TinyMCE media popup:

  • I can't upload an image.  Like the other users have described, there is no error message, the progress bar flashes for a second, but no file gets saved and it's as if I didn't even click "upload" on the ui
  • If I select an image the was uploaded via the Media module (i.e. on the "Browse Media" tab of the pop up), it can't figure out what the dimensions are of the uploaded image.

Everything is working fine on a similarly configured orchard installation that is using the full source download.

May 18, 2011 at 6:00 PM

A couple other observations:

  1. When I use the media picker on the functioning installation I see a url with this format: "/Admin/MediaPicker?uploadpath=Page&...", however on the non-functioning install, the uploadPath is blank ("?uploadpath=&...")
  2. Apparently, the dimensions aren't properly inserted on either installation when picking from the browse media tab.  The dimensions are properly populated, however, on the source installation when I upload an image directly from the mediapicker.
Coordinator
May 18, 2011 at 7:53 PM

Hi everyone, sorry there is so much trouble!

The problem might be due to an out-of-date javascript file. There are two scripts that setup the TinyMCE plugin to use the Orchard MediaPicker dialog, Modules\TinyMCE\scripts\plugins\mediapicker\editor_plugin_src.js and editor_plugin.js. They are the same script, but one is minified. The minified one may be out of date in 1.1. This explains the missing the 'uploadpath' parameter and why it is only in one setup but not the other (depends on whether the minified script is loaded or not).

Try copying the contents of editor_plugin_src.js into editor_plugin.js and let me know if that fixes it for you.

 

May 18, 2011 at 8:12 PM

That was it! Works perfectly now.

Thank you for sorting this out, I really appreciate it.

Dec 14, 2011 at 9:19 PM
Edited Dec 14, 2011 at 9:21 PM

This problem still exists in 1.1.3. Exactly the same scenario. No error, progress bar shows for a short period and then nothing. The work around is to create the image in the media library and then reference that. 

Richard

Coordinator
Dec 15, 2011 at 1:12 AM

1.1.3? Well, you'll have to upgrade to 1.3 then.