Closed (fixed)
Project:
YUI Rich Text Editor
Version:
6.x-1.2-91
Component:
User interface
Priority:
Normal
Category:
Feature request
Reporter:
Anonymous (not verified)
Created:
28 Apr 2008 at 21:57 UTC
Updated:
5 May 2020 at 08:33 UTC
Jump to comment: Most recent
Comments
Comment #1
rovowill this be included in the next release? Not really sure how to add patches.
Comment #2
Anonymous (not verified) commentedError message after uploading files
In Drupal 6.x there is an error message after uploading images using the patch above.
To fix this, replace line 214 in yui_editor.module with the following:
$file = file_save_upload('upload', array(), $path, FILE_EXISTS_REPLACE);Drupal 6 added an extra parameter to the functioncall.
Comment #3
gustavlarson commentedGreat work!
However I found a few issues except the one that you mentioned.
I have my development site installed under localhost/drupal.
However the POST made by the image upload is made to localhost/yui_editor/image_upload, when it should be localhost/drupal/yui_editor/image_upload
The response sent back to the browser also contains the wrong path.
Perhaps a minor issue, but you could wrap the text in the javascript file in Drupal.t() to make them translatable.
Comment #4
gustavlarson commentedAnother minor thing. I think it would be a lot better not to replace the old file if a file with the same name exists, but to rename the new one. You can not expect your users to know what filenames are already in use, and cause a lot of confusion.
Change the line
to
Comment #5
Anonymous (not verified) commented@#4: I agree with you. I choose to overwrite to prevent getting multiple copies of the same image. This happens when you use the image in several places or make changes to it after uploading. But this is less important, so for now I'll settle for FILE_EXISTS_REPLACE.
In the meantime I'll have a look at other options. I could think of the following (in order of complexity):
Comment #6
Anonymous (not verified) commented@#3: I'm glad you like it.
About your issue:
The prefix of the post is created by Drupal core. All I put in the module is yui_editor/image_upload which in my case results in the URL: http://www.myserver.nl/yui_editor/image_upload. As far as I know this is not different from any other Drupal module behaviour. (I copied the code from the upload module). I suggest you have a look at the $base_url setting in the settings.php file of your development site. This should be something like localhost/drupal in your case. An even better solution would be to create a virtual server for your development site if possible in your environment.
Comment #7
jeffcd commentedThis has been set and released in 2.9.94. Test and let me know. Thanks.