I just noticed the issue when I upload my drupal site to my hosting service. In my laptop everything works like a charm (with little php5 notices, but working) but when I uploaded my every user's avatars disappears.

First I though was a problem with my theme's templates, or a silly php notice error braking the image header, but the real issue is related with IMCE module that look like collides with drupal's user.module.

Context:

  • PHP 4.3.9 + MySQL 4.1.20 (but WORKING FINE WITH PHP 5.5 + MySQL 5.0.24!!)
  • Drupal 4.7.4 (also fails with 4.7.2).
  • Significant modules loaded: profile, i18n (all modules), cck (with imagefield), contemplate, views, image, image_gallery, img_assist, node_privacy_byrole, relativity, tinyMCE, upload, webform...

I template my profile_listing and user_profile showing the image using "user_image" theme.

Then my avatar images stop working (in every theme for instance: marvin or pushbutton) and when I ask directly for the themed image path... the image was found, but firefox report the following error:

"The image 'http://domainame.org/system/files/pictures/picture-1.gif' cannot be displayed, because it contains errors."

After tones of tests, review of privileges, debugging, reinstalling on different versions (some of them with just a few modules), the error just disappear when I disabled IMCE module, so seams clear to me that the issue is related with your module, probably restricting access to images also for user.module.

IMCE is a wonderful module, but I need the avatars so I probably will disable this until a solution is found.

Thanks a lot for your unvaluable work,

m.

Comments

ufku’s picture

IMCE has nothing to do with user avatars unless you set the shared folder as pictures and your download method is private. It is obvious that you use private downloads. What about IMCE directory? Using the pictures folder? If so, you should't because there may be insufficient or conflicting headers sent by the modules that react to download of the same file.

p1in9’s picture

Drupal 4.7.4
IMCE 4.7.x-1.0

I also having same problem missing image after enabled IMCE. It conflit with image gallery module. I not sure why. If I disable the IMCE all image recover.

ufku’s picture

Status: Active » Needs review
StatusFileSize
new1.07 KB

the patch prevents IMCE to send headers of a previosly sent type. i hope it works.

ufku’s picture

StatusFileSize
new1.06 KB

Previous patch wont work. Dont waste your time trying it. Try this instead.

mbria’s picture

Sorry dude, but patch3 didn't work... at least in my drupal.

BTW, yes I was downloading private but my shared folder wasn't pictures (it's sharedImg in a non web mapped folder).

I was working with Moxiecode when they free tinyMCE, but they didn't free some really useful plugins as their filemanager or imagemanager, so at this momment I think your module is the perfect complement for their webeditor.

May I help in some way? If you like, I can tarball my drupal and send it to you... please just let me know if I can do something.

ufku’s picture

StatusFileSize
new1.78 KB

here is the patch #4. (a complete rewrite of imce_file_download)

mbria’s picture

Sorry for the delay in my answer.

a complete rewrite of imce_file_download
I'm sorry for this. :-(

Great ! It worked for profiles!! but... I made some test further than profiles and unfortunately now tinyMCE images embedded with IMCE are not shown when submitted.

You can insert images and they could be seen during tinyMCE edition but when you preview or submit the image disappears. :-(

To be (quite) sure was not me, I download the last IMCE version (not cvs) and I patched with your forth patch... but still no luck.

ufku’s picture

using the correct input format? does it support img tag?

mbria’s picture

Silly me !! You are right. :-)

As far as I can see, now this bug is completely fixed.

Thanks a lot for your work.

ufku’s picture

Status: Needs review » Reviewed & tested by the community

thank you for testing.

ufku’s picture

Status: Reviewed & tested by the community » Fixed

committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)