Plupload don't load files. It integrated well in upload form, show progress when uploading, but that’s all, nothing happing more.
In debuger i see that the function imce_plupload_upload_submit isn't started.

Comments

fupduck’s picture

I haven't installed a debugger so i don't know which functions are evoked, but same problem here...
Any idea yet?

kingdutch’s picture

Assigned: Unassigned » kingdutch
Category: support » bug
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new1.88 KB

The attached patch should fix this issue.
Let me know if it works and I'll push it into 1.1

belant’s picture

After patch it works only in the following sequence: to add files, to download through plupload, to press the upload button in IMCE. And after that the list of the file isn't cleared until then IMCE won't be closed, and therefore it is impossible to upload anything once again.
If to upload by means of the IMCE button, ajax hangs.
I use IMCE 7.x-1.6

fupduck’s picture

First of all thank you for your fast reply!

I had an outdated plupload integration module (1.00-beta3; should be 1.00) - what surprises me since i ran update..

Anyhow it didnt't work after the update.
So I applied the patch. ( I did it manually created imce_plupload.js and added the 2 lines to imce_module - i hope this is correct).

Now the images are saved, but before the success is shown many warning messages are thrown.
I hope I got them all (I had to make screenshots - they were too fast to read).

  • array_merge() [function, array-merge]: Argument #1is not an array in file_validate() (line 1635 in includes/files.inc)
  • array_merge() [function, array-merge]: Argument #2is not an array in file_validate() (line 1635 in includes/files.inc)
  • array_unshift() expects parameter 1 to be array, null given in file_validate() (line 1635 includes/file.inc)
  • call_user_func_array() expects parameter 2 to be array null given in file_validate
  • Undefined property: stdClass::$image_dimensions in file entity_file_update() (line 90 in modules/contrib/file_entity/file_entity.file.inc)

I didn't find out where these functions are called and i hope it hast nothing to do with my file.inc.
Thanks again!

Edit:

I got another warning.
Invalid argument supplied for foreach()in plupload_element_validate() (line 202 in plupload/plupload.module)

If these error messages belong to another project I would be glad if you could point out which ones, so that i can start an issue there/look for a matching issue.

Edit #2:
The "start upload" button doesn't work for me neither and I have to close and reopen to upload more images after uploading.

Greetings,
fup

belant’s picture

I found that uploading doesn't pass when $validators=NULL in
$validators['file_validate_extensions'] = ($imce['extensions'] === '*' ? NULL : array($imce['extensions']));
In this case _upload_submit function doesn't work.

kingdutch’s picture

Status: Needs review » Needs work

The symptoms you describe match what I have been able to reproduce, however I also have a live system running the original version of this module (which at this point has the exact same codebase as the released module) without any problems.

I hope to have some more time in the weekend to figure out why this isn't working and come up with a fix.

belant’s picture

When you will have time try your module on an original drupal distribution only with wysiwyg+ckeditor+imce+imce plupload, on it config the problem is visible, thanks.

kingdutch’s picture

belant's comment in #5 made me look at the settings.

The current workaround to this problem is to not set the permitted file extensions of imce to "*" (changing this to e.g. "jpg png gif swf" makes the bug go away).

I'll try to figure out why "*" is failing and make that work.

kingdutch’s picture

Status: Needs work » Needs review
StatusFileSize
new3.16 KB

The attached patch should solve the errors appearing when "*" is used as extensions in the imce configuration. The only side-effect is that plupload enforces its own set of default extensions, however this is not something that can be fixed in this module.

If the attached patch is confirmed to work (I changed some other things which could be included so it might be needed to pull down the latest 7.x-1.x tree from the git repo to get the patch to apply) I will release 1.2 with the fix.

belant’s picture

Uploading do well, but why uploaded files remain in list? To upload new files it is necessary to close file manager each time. Is it in my configuration only or it has to be so?

kingdutch’s picture

Status: Needs review » Fixed

As the uploaded files now work I'm going to mark this issue as fixed and release the patch as a stable version.

The file uploads remaining in the plupload list is the way the plupload module works, I believe it's designed to submit to a new page instead of through ajax which means this issue would normally not exist. A solution that doesn't require closing and re-opening the file browser is to simply refresh the page (F5). If it really bothers you you can open a new issue and I'll see if I can do anything about it (it'll probably just result in an auto-refresh after the items have been uploaded), however I would like to keep it out of this issue as it's not related.

fupduck’s picture

Hi there!

thanks again for your fast reply and patch =)
I'm still getting one last error:

Notice: Undefined property: stdClass::$image_dimensions in file_entity_file_update() (Zeile 90 von [...]/file_entity.file.inc).

Any idea? Thanks again.

Sorry my bad. Applied the patch wrong.
Thanks again for your work!

kingdutch’s picture

Priority: Major » Normal
Status: Fixed » Postponed (maintainer needs more info)

It's not an error I've encountered but I'll take a look at it. Could you give some steps to reproduce? (Installed modules, what did you do when the bug appeared, etc.) Maybe someone who also experiences this could pitch in?

kingdutch’s picture

Status: Postponed (maintainer needs more info) » Fixed

Seeing as the last post saying that there was a problem is now saying the issue is fixed and no one else has showed up with any complaints after the last release, marking this as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.