when SWFUpload.module
http://drupal.org/project/swfupload
activated it totally disables the widgeditor for body text area. - (it renders widgeditor toolbar invisible)
I presume a js conflict with either/both modules

- thanks for updating the module to D6 - compare with other editors widgeditor seem produces cleanest code

CommentFileSizeAuthor
#6 swfupload-settings.tpl_.php_.txt3.77 KBfalix

Comments

Gurpartap Singh’s picture

Project: widgEditor - A WYSIWYG editor » SWFUpload
Version: 6.x-1.0 » 6.x-1.x-dev

It is actually a bug in the SWFUpload module's swfupload.src.js. The error reported by firebug is:

SWFUpload is not defined
[Break on this error] ref.settings.button_window_mode = SWFUpload.WINDOW_MODE.TRANSPARENT;
swfuploa....src.js?I (line 70)

The ref.prepareSWFButton() function doesn't define SWFUpload variable anywhere, but it is used on line 70 and 71.

(This isn't a conflict with widgEditor module's JS, rather SWFUpload having precedence in {system} loads it's JS before widgEditor and as soon as the error occurs, the browser stops further JS processing.)

ica’s picture

Thank for checking this Gurpartap, I assumed the same and posted the issue to the SWUPload module too
http://drupal.org/node/342746

guess the issue a js process order problem

cheers

Gurpartap Singh’s picture

Title: SWFUpload.module js conflict » SWFUpload.module javascript error
Gurpartap Singh’s picture

Marked the other issue as a duplicate.

falix’s picture

FTF: Excuse my poor english

I have the same issue. The starting function isn't called by the window.onload event. So the swfu object isn't defined. My first idea was just to remove the event and the function : it works.

//window.onload = function() {

//};

But then i've got a jquery error :

uncaught exception: Could not find the placeholder element.
jquery.form.js?f()()jquery.form.js?f (ligne 13)
[Break on this error] eval(function(p,a,c,k,e,r){e=function(c)...|POST|toString|jQuery'.split('|'),0,{}))

Still working on it.

falix’s picture

Title: SWFUpload.module javascript error » SWFUpload.module javascript error : a solution
StatusFileSize
new3.77 KB

the 2nd attempt was succesfull : i've used the jquery window on load event : it works !

$(window).load(function() {
var settings = {
flash_url : " print $modulepath; /swfupload/swfupload.swf",
upload_url: " print $uploadpath; ", // Relative to the SWF file
post_params: {"PHPSESSID" : " print $sessionid; " , "nodetype" : " print $nodetype; ", "fieldname" : " print $fieldname; "},
file_post_name: "Filedata",
file_size_limit : " print $maxfilesize; ",
file_types : " print $fileextensions; ",
file_types_description : "Only images",
file_upload_limit : " print $uploadlimit; ",
file_queue_limit : "0",
custom_settings : {
progressTarget : "fsUploadProgress",
cancelButtonId : "btnCancel"
},
debug: false,

// Button settings
button_width: "36",
button_height: "37",
button_placeholder_id: "spanUploadButton",
button_image_url: " print $modulepath; /swfupload/select_images.png", // Relative to the Flash file
button_cursor: SWFUpload.CURSOR.HAND,

// The event handler functions are defined in handlers.js
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
queue_complete_handler : queueComplete // Queue plugin event
};

swfu = new SWFUpload(settings);
});

kewlguy’s picture

Is this still relevant? Or, has it been fixed?

skilip’s picture

Status: Active » Closed (fixed)

Probably fixed in v.6.x-2

gizmo123’s picture

Version: 6.x-1.x-dev » 6.x-2.0-beta7
Priority: Normal » Major

I'm getting a similar issue with 6.x-2.0-beta7.

Issue: swfupload button is disabled.
Library: 2.2.0.1 (sites/all/libraries/swfupload/swfupload.{js,swf})

Steps to reproduce:
- Install drupal, filefield, jq and swfupload modules
- Set JQ's swfupload path to the location where .js and .swf are, it will show that it is okay (green check)
- Create a new content type, add field type file with swfupload widget (any settings)
- When creating new content for your content type you will see the widget disabled

There is a JS error saying:

Error: SWFUpload.WINDOW_MODE is undefined
Source File: http://yourdrupal/sites/all/modules/swfupload/js/swfupload_widget.js?K
Line: 67

For your reference, I'm on linux, firefox 3.6.8 and plugin: Shockwave Flash 10.1 r53
Recommending major priority for the following reasons:
- this blocks functionality completely
- however this is still a beta, critical priority therefore is not justified.

Thanks,
gizmo