Hello,

With a new installation of drupal 6.5 with the YUI Rich Text Editor I encounter the following problem.
When trying to upload an image in the editor, the yui-popup-window appears and I am able to search for a file. When clicking upload, this file is transferred (I can see this in the browser when uploading large images), but afterwards it is not shown in the editor. With the next page I get the following error message:

"warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'yui_editor_image_upload' was given in /www/htdocs/usernamexx/drupal6/includes/menu.inc on line 348."

My current configuration is (all modules with the latest version as of 11.Okt 2008):
- Drupal 6.5
- YUI 6.x-1.1-beta3
- YUI editor 6.x-2.0
- Image 6.x-1.0-alpha3
- Image- Attach 6.x-1.0-alpha3

- upload is installed, ALL permissions are set
- folder "mywebsitename/files/images" does exist and is writeable (777)
- Server is running with PHP version 4.x at all-inkl.com

Does anybody have an idea what I am doing wrong? Why is the file not written into the directory? Do I need any other additional module?
Maybe the website helps?!? http://www.lichttherapie-ratgeber.de

Thank you in adwance. Best regards
Rolf

Comments

drp33’s picture

I am having the same issue when I try to upload an image:

Drupal 6.4
YUI 6.x-1.1-rc1
YUI Editor 6.x-2.33
Local YUI Library 2.6.0

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'yui_editor_image_upload' was given in /var/www/html/[mysite]/drupal/includes/menu.inc on line 346.

I've tried this wil YUI Library 2.6.0 and 2.5.0.

Thanks
drp33

mecano’s picture

Hello Rolf,

by looking at your website it seems you fixed the problem, how did you do this?
I'm having the same menu.inc error with drupal 6.8

Also maybe this will be interresting for the dev http://allmybrain.com/2007/10/16/an-image-upload-extension-for-yui-rich-...
(see the updates at the end of the post)

codeseek’s picture

I'm getting the same error and don't know what to do. My directory permissions are set, I can upload images using the drupal image module without problems, and what's truly confusing is that this seems to work on my local machine.

Any ideas?

codeseek’s picture

In case anyone else runs into this.... the error went away when I removed a value in the Paths setting of the YUI Editor module profile.

mecano’s picture

After going back to 6.x-1.2-97 which worked fine (except you have to patch it to tag uploads as permanent) for me, I tried again with last rev and experienced this naughty error again. This time I decide to investigate this. I was able to fix this by moving the yui_editor_image_upload() function from img_upload.inc to yui_editor.module (seems clearly a path problem, probably coming from my set up).

Also note that people experiencing the 'Upload' dead link should look into their yui lib build/ folder and compare this with the yui_editor_load_libs() calls. For example in my 2.6.0 lib build/element folder I have 'element-beta-min.js' but yui_editor.module tries to load 'element-min.js' for 2.6.x. In my case, commenting out the 2.6 conditionnal in yui_editor.module fixed the dead link problem.

[edit]
I revert back the function to img_upload.inc, clear all caches (I had to wipe the cache menu directly in the db) and I've gone the "no path" in yui profile way as others did to fix this (some can still filter yui-editor display by node type though), error is not coming back.

ppcc’s picture

I was experiencing similar issues, with a dead "upload image" link... the url wasn't updated when clicking the link, no image inserted.
Firebug showed calls to element-min.js were failing.
Commenting out the 2.6 conditional statement didn't work.

changing the Library location in Yui Common Settings to point v2.5.0 instead of 2.6.0 fixed it, eg:
http://yui.yahooapis.com/2.5.0

I'm sure there a better solution, but this worked for me.

alarcombe’s picture

Tamanda’s picture

Hi, I need some help please: I installed the YUI rich text editor and I got it working eventually. It worked perfectly. Then after I made some changes to my website: i.e. adding some modules (I can't remember which - I've added a lot), the image upload just doesn't work anymore.

The following is the error reported:

Message: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'yui_editor_image_upload' was given in /home/afrocepc/public_html/includes/menu.inc on line 348.
Severity: error

I'm using drupal 6.14
imce-6.x-1.3
yui_editor-6.x-2.33
yui-6.x-1.1-rc2
wysiwyg-6.x-2.0
YUI Common settings - location of my library is http://yui.yahooapis.com/2.5.0

I'm a drupal newbie, so your help would be greatly appreciated.