Hi, I am running Drupal 6.17. The issue is that all over the site, images cannot now be viewed after updating a few modules including CCK and Filefield. (all modules are now updated). The site was working fine before- all images viewable with Imagecache. Now, where the images once were, an image icon shows up for a split second and then disappears. The rest of the text and everythings else from the database is normal.

If I delete the CCk or Filefield modules, this split second thing doesn't happen making me think it is a bug in one of those modules. All permissions are turned on. Also, the images are there in the Imagecache folder. I am a newbie to Drupal and not a programmer, but have been successful with a few Drupal sites so far. This time I am stumped.

Thanks

Comments

quicksketch’s picture

Status: Needs work » Active

Make sure that the ImageField module didn't get disabled when you updated your site. The versions prior to 3.7 had a problem that would cause ImageField to become disabled if FileField was not found. I suggest updating ImageField (if you haven't already), then make sure that it's enabled.

mindfl10’s picture

Thanks,

I did check the modules page to make sure all were enabled (checked them against a working Drupal site)...

One more thing I discovered that may be related. When editing views, and saving a change such as changing the Imagecache preset, the Drupal interface started breaking down into code. I can navigate back with the Browser, and around the site but this is an issue.

Similar to this post:

http://drupal.org/node/496886#comment-3231708

mindfl10’s picture

Nevermind that second issue (about the views bug). That seems to have been connected to some bad script in page.tpl.php

The issue of dissapearing images persists. Everything about images that I can see is correct: Imagecache. all the correct modules, etc

The image icons appear on the site for a split second and then disappear. When trying to upload images, I don't get an error message, but the thumbnails are not created. All previously crearted images are still in Imagecache folders.

Thanks

mindfl10’s picture

Ok, I tried that- updated to the newest imagefield module and made sure it is turned on. Problem persists....

quicksketch’s picture

If you view the source of the page, what are the images pointing to? Do this occur for all images or just ones that are provided by ImageCache?

mindfl10’s picture

Generated Page Source is pointing to URLs that don't seem to work:

http://www.sitename.com/?q=system/files/imagecache/tiny/image.jpg

when I put this URL in the browser, I get nothing.

However, I can locate the image by pointing to:

http://www.sitename.com/sites/default/files/imagecache/tiny/image.jpg

so the Drupal ?q= path seems to be the problem somehow. With one of my working Drupal sites, this same generated source worked fine.

The problem occurs only with Imagecache images.

quicksketch’s picture

If it only occurs with ImageCache images, it's probably a change by that module rather than by FileField.

mindfl10’s picture

I just reinstalled the Imagecache module. Problem persists. Unitially, when the issue started I had not done anything with the imagecache module- just updated the Filefield and CCK modules.

thanks

mindfl10’s picture

It may have to do with the Imagecache module, but the installation seems fine. Based on the above information, do you have any ideas of how to proceed? I'm stuck...

quicksketch’s picture

I do not have further ideas based on the information that is available.

norbert.moehring’s picture

Hi there,

I think I found the problem but the solution is still missing. I jumped into the code to see what is happening. ImageCache has the following line for the permissions check:

if (user_access('view imagecache '. $preset) && !in_array(-1, module_invoke_all('file_download', $source))) { ...

the module_invoke_all fires the file_download hook of every module that implements it .. including filefield. Even though a user might have the imagecache permission to view for example a preview image, filefield will still return a -1 that the user is not allowed to download the file.
filefield_view_access($field_name) returns false because in my case the guest user is not allowed to view filefield .. but he/she should view a preview image.
ImageCache is not the problem here, it returns true on the call 'user_access('view imagecache '. $preset)' because I gave access. This issue belongs to filefield.

quicksketch’s picture

filefield_view_access($field_name) returns false because in my case the guest user is not allowed to view filefield .. but he/she should view a preview image.

If you want ImageCache to grant access to files that aren't normally allowed access, then it's an ImageCache feature request. Normally if a user does not have access to the original image, they also do not have access to any of the ImageCache derivatives.

quicksketch’s picture

Status: Active » Closed (cannot reproduce)

Closing after lack of activity.