I came across a probably rare / easily worked around bug yesterday.

Conditions:

If you are using Webfm to allow uploads to OG groups and have not set up any "role" root directories, you may get a "file has an invalid extension" error on ALL files you try to upload.

This happens because until you define at least 1 role root directory, the webfm_extensions_ (role id num) variable does not get set. So, there are NO valid extensions for any role that has upload permissions. (BTW - I think it still works if you have admin rights.. so test under a non-admin account).

The quick work around is to define a root directory for any role. This causes the file extension variables for ALL roles to be saved in the variable table. Once you've done this, just "blank out" the role directory and you can now use OG root directories without role directories.

A quick walk thru the admin forms code didn't show why this was happening.. but it's so easy to work around and probably a rare case, just documenting this is probably enough.

Comments

nhck’s picture

Category: bug » feature

Hej,

I am not sure this is a bug or if it is "by design". At some point and time we have to force the admin to check if those file-extensions are okay to be uploaded, right?

Maybe whats actually bothering is that you have to set a role root directory?

Thanks.