Image Upload fails

mkearl - June 16, 2008 - 18:57
Project:YUI Rich Text Editor
Version:5.x-2.6-95
Component:Code
Category:support request
Priority:critical
Assigned:Unassigned
Status:closed
Description

When I try to add an image using the new image upload facility it fails on "Upload Image". I can select a file, but when I hit "Upload" the file name appears in the field, but then disappears. The file is uploading to the server correctly, but the uploader "loses" it.

I believe the problem is that the image uploader is attempting to insert "files/images/filename.jpg" into the editor, when the file is located at "/files/images/filename.jpg". The editor is checking if "files" exists, but as it doesn't it resets to a blank upload. This is testable by typing in both paths manually (the second works). This may be server specific, as we don't use the Default drupal site, but have multiples installed.

In any case, it should be easy to resolve.

#1

raveoli - June 18, 2008 - 21:20

Yes, I have the same problem as the original poster. Can't insert images.

I'm usings Media Temple, and Safari on Mac OS X 10.5.3 if that matters.

I hope it can be fixed soon, since my world be be perfect then;-)

... Well... One step closer;-)

#2

mkearl - June 18, 2008 - 23:10

If you remove clean URL's option in the admin settings, you can upload the file (I verified it uploads), and then it will appear in the editor like normal. It looks totally as if everything is going to work. I even click the coder button and all the HTML appears correct, however once you click save, it will save all links, text, etc.... except for the section. It will manually pull out the link that would normally link the image to the web site. It pulls the whole tag right out of the post. What ever is publishing it, doesn't carry over the image tag section.
As for the orig. problem of having the image disappear when "Clean URL's" are enabled. I have no clue. For the time being, if you want to work the problem with the "Clean URL's" turned off, it may be easier. I haven't dug into the module code yet, but most likely will here in the next couple days. I am getting sick of this not working and no one fixing it. I really have no clue what I am doing, but I need to get this up ASAP.
Please, if you know what you are doing with this module's code, this error needs to be fixed.

#3

bgeddes - June 20, 2008 - 15:20

Subsribing.

Same thing happens with 5.x

#4

jeffcd - June 20, 2008 - 16:57

- The image tag might be getting stripped because of the input filter you have set.

- I will fix the image upload bug this weekend. For now you should probably just turn the feature off.

#5

niftyc - June 22, 2008 - 19:45

Same problem. I am new to YUI Rich Text Editor so I tried 1.2-94 to see if it was new code in -95 that caused it, but the upload error persists.

I'm posting in the slight chance that this information is of any use to you.

Thanks for all of your hard work on this module.

#6

jeffcd - June 23, 2008 - 01:07
Status:active» closed

Try using the latest version (6.x-1.2-96). This should be fixed now.

On another note:
If you are seeing the tag stripped after you submit the page, then it's probably due to the 'input format' you are using for the field where the content is entered. For instance, if you choose the default 'Filtered HTML'....

#7

mkearl - June 23, 2008 - 16:35

Thanks. That input format did it. Once I turned it over to full HTML & new module, it worked like a dream. You are the man! Thanks dude.
--MKearl

#8

niftyc - June 23, 2008 - 17:10
Version:6.x-1.2-95» 6.x-1.2-97
Status:closed» active

Thanks jeffcd, but with -97 I still have the same problem as the original poster, but the path is now correct. That is:

When I try to add an image using the new image upload facility it fails on "Upload Image". I can select a file, but when I hit "Upload" the file name appears in the field, but then disappears. The file is uploading to the server correctly, but the uploader "loses" it.

I guess some Javascript is overwriting the URL with "Image URL Here", which is the text that re-appears.

I see this on Firefox 2 (Win XP).

Thanks again for your hard work and I'm sorry to be the bearer of bad news!

#9

jeffcd - June 23, 2008 - 23:42

I have -97 installed on my hosted site and local machine and it worked fine with and without clean urls.

Are you sure you're using -97? Does it say as such at admin/build/modules?

#10

niftyc - June 24, 2008 - 23:50
Status:active» closed

OK it is working now -- I feel so silly. I *am* using -97 and I swear it didn't work yesterday. But maybe something was cached in my browser? Don't know. Sorry to bother you.

#11

Skys0 - July 4, 2008 - 14:03
Version:6.x-1.2-97» 5.x-2.6-95
Status:closed» active

hello, I have the same problem with the 5.x version, the image is uploaded but the URL disappear... Probably the same bug that for this 6.x version...

#12

d_b - July 4, 2008 - 15:57

You can try to fix yui_editor.js like this :
line 216 :

-                   Dom.get('insertimage_url').value=o.image_url;
+                   Dom.get('insertimage_url').value='/'+o.image_url;

#13

buttonwillowsix - July 8, 2008 - 00:02

I am having this same issue (using Drupal 6.2, Firefox 3 on a Mac). The problem occurs with both clean URLs and without.

#14

Skys0 - July 8, 2008 - 13:11

@ d_b: Thanks, the problem is fixed for me.

#15

jeffcd - July 8, 2008 - 17:59
Status:active» fixed

I forgot to fix this in 5.x and have just submitted a new release -- 5.x-2.6-96.

#16

jeffcd - July 16, 2008 - 00:46
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.