I use:
Drupal 6.20
Lightbox 2 6x-1.11
Imagecache 6x-2.0 (with ImageAPI)
Ubercart 6x-2.4
I use clean URLs and my drupal file-system is set to Public

For the first two weeks everything worked fine. Now, however, there seems to be a problem with Imagecache. I can upload a picture, but when I go to the node it's supposed to be on, there is nothing. I have to hit Ctrl+F5 (hard refresh) to make the image appear. This happens with all the ImageCache presets. The original file gets uploaded but the presets aren't created until the Ctrl+F5.

Does anyone have an Idea how to fix it??

Thanks in advance.

Comments

drup_435’s picture

I've the same problem. Works for me on the localhost, but I have to refresh twice on the hosting. I have to access the full size image directly (and again F5) to make thickbox show the image.
edit: The image is created on the server, but not shown in the browser the 1st time.

Anonymous’s picture

yeah - it's the same problem, although, mine used to work on hosting at first, and then it stopped - no idea why. I was making some small changes to my site but nothing that should affect imagecache.

Any thoughts on this? Ideas, how to deal with it?

drup_435’s picture

I spent nearly 3 hours debugging this, writing watchdog debug messages etc. I also captured the traffic with wireshark and found the image is transferred, but has \t\n at the beggining. Then I found I've some blank characters before <?php in one of my modules, which I unwillingly edited in notepad++ with utf8 encoding. I thought cleaning the output buffer should prevent this kind of errors, but it's doesn't work on my hosting. So I removed the blanks and it finally works.

Anonymous’s picture

Never thought to check other modules.
I'm going to check my modules now - I've also used Notepad++.

Thanks for the idea!

Which text editor did you use to check for the blank characters before '<?php'? I've tried with Dreamweaver, but I couldn't find any. So either I have a different error or Dreamweaver is not showing the blank characters.

drup_435’s picture

Sorry I forgot this... I use netbeans with php plugins now. You can verify you've the same problem with the chrome or wireshark. In the chrome developer tools/network (ctrl+shift+i) you can save the image icon, and look at the file then. But wireshark is better I think.
Also delete all the closing ?> in your php files, they can have trailing blanks.

Anonymous’s picture

Sorry it took so long - I was out of town.

I tried to use the Wireshark to check my site but I didn't see any blank characters. I have never used wireshark before so perhaps I did something wrong? Could you give ma a short discription how to check for those blank characters with wireshark?

Thanks so much for your help.

Anonymous’s picture

OK, ImageCashe started to work again after I resaved one of my modules. I assume that there was some kind of probem with coding.

Thanks for help.

whirled’s picture

Can anyone provide any more insight into this problem? I am also experiencing this issue, and have not been unable to resolve it as of yet. When viewing a node with an imagecache image on it, the image does not display initially until the page is reloaded. Once the image is created, subsequent views of the page display the image correctly.

I have disabled/uninstalled a few modules, but still have not been able to fix the problem.

I have tried pretty much every other suggestion found through hours of Google searches, but nothing seems to resolve the issue. File system access is public, clean URLs are on, permissions set to 777 on the files directory.

This only seems to affect one of my views as far as I can tell at this point. The view displays a gallery of images, this gallery view is having the problem of images not being displayed when they are initially created. If I view the full node, the image that is produced by imagecache displays correctly the first time without requiring a reload.

Any help or insight into this would be greatly appreciated.

fizk’s picture

Status: Active » Closed (fixed)

Please reopen if this is still an issue with ImageCache 6.x-2.0-rc1.