I have just recently inherited this project and am having problems with the file browser. Uploading a new image will result in the image appearing in the file list but not on the preview pane. Also, the dimensions shows up as zero and if I try to delete it I get an error. Log says "Illegal choice something.jpg in directory (sites/default/files) element.". The weird thing is if I try this again with the same file it works just fine. Could this also be an IMCE Image issue?

Comments

hanifnorman’s picture

I should also add, the 1st time around, after uploading "successfully", if I click on the 'add to imceimage' the field would still be empty.

ufku’s picture

This may result from non-ascii characters in your file name. The problem usually is the filename is in utf8 in database but not utf8 in file system.
Try transliteration module if this is the case.

hanifnorman’s picture

I don't really have any non-ascii characters in the names of the files I've tested with but I'll try the transliteration module anyway to see if it helps

hanifnorman’s picture

Ok transliteration module does not help to alleviate this. It also seems to remember the file names of previous attempts so uploads only fail the first time around(unless I change the filename). Files that I have tried days ago to upload now does so without any problems.

Any other ideas?

hanifnorman’s picture

Priority: Normal » Critical
ufku’s picture

test it for non-image files to see if it is an image-specific problem or not.

hanifnorman’s picture

Ok I have tested with pdf and excel files and it's still the same. Does this mean it's a file upload problem and not IMCE?

Update: Ok I uploaded those using the IMCE file explorer but using normal file uploads(i.e.,attachments) works fine

hanifnorman’s picture

Anybody care to shed some light on this please? I'm getting some heavy breathing down my neck on this

ufku’s picture

If I were you, I would try
- using the module on a clean drupal.
- changing drupal file system path.
- changing temp directory. maybe defining it under file system path.
- using the interface without javascript.

hanifnorman’s picture

Ok I know it took a while but I've tried out all your suggestions and changing the file system path to a different directory solved the problem. However, moving everything to a new directory would be very tedious and also confusing to my users when they need to view uploaded files so I would like to keep using the original folder. Any ideas on what's causing this? Wrong permissions? At the very least I want to be able to prevent it from happening again.

Some info if it helps:
File system: Writable (public download method)
GD library: bundled (2.0.34 compatible)
MySQL database: 5.0.24a
MySQL database for event module: 5.0.24a
PHP: 5.2.3
PHP memory limit: 128M
PHP register globals: Disabled
Unicode library: PHP Mbstring Extension
Web server: Microsoft-IIS/5.0

ufku’s picture

Status: Active » Fixed

You may backup your files and delete & recreate the problematic directory.

Status: Fixed » Closed (fixed)

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