I'm experiencing some trouble with the WebFilemanager module.
When users that are assigned to their own roles with WMupload permission, actualy try to upload things a messagebox appears stating: "Unspecified error occured"
The site administrator can upload without any problems.
I'm clueless on the nature of the problem and any help would be greatly appriciated.
We are using Drupal 6.20

Thanks
Raf

Comments

andrew_rs’s picture

I had the same error. I rolled back to version 2.12 and upload worked again.

Anonymous’s picture

Title: Unspecified error » Uploads fail - Unspecified error
Category: support » bug

Hi, we have exactly the same issue.

We never managed to get Organic Groups user roles to work with WebFM despite trying the cache clearance and MySQL table edit tricks. To get around the problem of the "File Upload" link not being visible to users with the correct OG Roles, we assigned a site wide role to these users and gave this role the WebFM Upload permission. This worked fine in 2.12.

In 2.15 the "File Upload" link remains visible but attempting to upload a file results in a message which says "An error occured: Unspecified Error"

I tried disabling OG User Roles thinking this could be some weird conflict between site-wide permissions and organic group permissions. Unfortunately this didn't make things any better.

We've rolled back to 2.12 for the time being, but would love to know what the cause might be. I've spent a full day trying to track it down without success.

Anonymous’s picture

Category: bug » support
coylej’s picture

Assigned: Unassigned » coylej

I've had the same issues as above. Also rolled back to 2.12 for now, which is working, but would like to know a fix for the more recent version.

nhck’s picture

Assigned: coylej » Unassigned
Status: Active » Closed (cannot reproduce)

Sorry, but you guys need to provide more information on your environment and what you do. Just saying "me too" does not help.

filsterjisah’s picture

I receive this error, propably error reporting is turned off on others their server which results in: "Unspecified error".

An error occurred:


Fatal error: Call to undefined function mime_content_type() in ...\sites\all\modules\contrib\webfm\webfm.module on line 2799

filsterjisah’s picture

An extra validation is added for WMupload permission only, so when VMadminister permission is enabled, this validation is skipped.

The validation first searched if fileinfo extension is enabled, if not it will check mimetype base on php function 'mime_content_type()':
mime_content_type() is php deprecated function (source: http://php.net/manual/en/function.mime-content-type.php), strange it is used here...

The workaround/solution to this could be:

- Install PHP Pecl Fileinfo extension on your server
- Enable extension in php.ini
- Define location in php.ini of mime_magic.magicfile

If this is not possible to install on the server, the issue will maintain...

filsterjisah’s picture

Status: Closed (cannot reproduce) » Needs work

Needs rework around line 2799 in webfm.module file:
- when Fileinfo extension could not be installed on the server
- user has only 'webfm upload' role

Can you reproduce the issue, nhck?

nhck’s picture

The function is in the code to maintain backwards compatibility.

filster are you using this release already - if not please try if it fixes your problem? http://drupal.org/node/1096906

cazam’s picture

Version: 6.x-2.15 » 6.x-2.16-rc1

Hi, I'm having the same problem, only users with permission "administer webfm" can upload.

Any other user, even though they have permissions "access webfm" and "webfm upload" receive the error

"An error occurred:
Unspecified error"

Apache logs show:

PHP Fatal error:  Call to undefined function mime_content_type() in /var/www/vhosts/freeksonline.com/httpdocs/modules/webfm/webfm.module on line 2798, referer: http://freeksonline.com/webfm

Same errors occur when using "webfm 6.x-2.16-rc1", I'll try to get mime_content_type for php now.

Regards
Kadu

nhck’s picture

Oops sorry, my bad: This didn't make it into the rc, but only in the dev version. Can you try the dev version please?

nhck’s picture

Status: Needs work » Closed (fixed)