Upload module (latest CVS version) seem to have the following bug:
I cannot upload anything when logged in as user (but in admin mode everithing is OK). The error message appears: "The selected file can not be attached to this post, because it is only possible to attach files with the following extensions...". The interesting fact is that file name should be included in this error message (accoring to the upload.module sources: "The selected file %name can not be attached..."). I've checked the value of $node->files in _upload_validate function - array items seems to be empty !
Now I have simply removed if (is_array($node->files)) {... } block, but this allows users to upload any file types and sizes.
Please advice.
Using upload.module version from 4.7 beta 5 release is not good for me - the "Listed" checkbox gets unchecked after node submission, so I have to click 'edit' and check it again.

Comments

JHeffner’s picture

This was introduced with 4.7beta6. Uploading worked completely fine in beta5, and our site broke when I upgraded. We get the same message when trying to upload now. I found that the file never gets uploaded at all to the temp directory., even when logged in as admin.

If anyone has any suggestions we would appreciate it.

Thanks

dopry’s picture

I tried reproducing as best I can... does the patch in http://drupal.org/node/54186 fix your issue? There is also a problem with foreach's in upload.module in beta6.

JHeffner’s picture

That didn't do it. I tried the latest cvs version first, and then applied your patch. The file no longer even makes it up to the server. I put beta5 back on my dev site and it's working again.

I'm running PHP 4.4.1, IIS, ISAPIRewrite and using private files.

scoonz’s picture

This patch can't help.
to JHeffner:
Do you have a problem with dissapearing "listing" checkbox in beta 5 release?

--
Building bands and music communities sites, thanks to Drupal !
Music demos online

JHeffner’s picture

I have that problem in beta5 as well. It seems this was introduced in beta5 and wasn't a problem in beta4. Hope that info helps.

dopry’s picture

If the file doesn't even make it to the server you may have something else going on.. Can you open an issue against this. I will need to find somone familiar with IIS who can debug it with me.

If the file doesn't pass validation it will not be uploaded. When you file the issue could you also post the file you are having trouble uploading?

.darrel.

scoonz’s picture

ISS has nothing to do with that - I have the same bug with Apache: the file does not appear even in tempory directory (untill I remove "if (is_array($node->files)) {...}" (line 250))

--
Building bands and music communities sites, thanks to Drupal !
Music demos online

JHeffner’s picture

This doesn't appear to have anything to do with the server type. I'll check the current issues this morning and if I can't find someone who already submitted it. If not then I'll submit a new issue.

Update: I added to the issue at http://drupal.org/node/54298.

scoonz’s picture

The problem seem to be fixed !
http://drupal.org/files/issues/54298.patch

--
Building bands and music communities sites, thanks to Drupal !
Music demo

JHeffner’s picture

The patch didn't work at all for me. I'm still unable to upload files after ugrading from beta5 to beta6. There is still something that isn't working correctly.

scoonz’s picture

Hmm... Very strange. Beta 6 + that patch works fine for me.
May be you have some problems with files directory permissions ?

--
Building bands and music communities sites, thanks to Drupal !
music demo

JHeffner’s picture

I had several problems but finally did get it working. First I had the problem described at http://drupal.org/node/54298 and I also used a hard coded directory path for my temp files directory. A relative path continues not to work still in beta6. I also had some issues with flexinode and had to uninstall it. After this the patch worked fine above. Thanks for following up.

Today I'm upgrading to RC1 so I'm hoping that I don't run into anymore upload problems. I also have to check the flexinode list and see if the issue I experienced with the flexinode_file_download fucntion has been corrected.