Fast 404 does not allow image style presets to create thumbnails when it's enabled. Using drupal 7.9

Comments

FiNeX’s picture

Same here using D6.22 and Fast 404 6.x-1.2.

All nodes with images created after enabling fast 404 doesn't have all the preset images from imagecache.

Tried with both
$conf['fast_404_allow_anon_imagecache'] = TRUE;

and
$conf['fast_404_allow_anon_imagecache'] = FALSE;

Example: the image has three derivate images thanks to imagecache: the image shown inside the node, the zoom and the preview shown inside views. Only the preset shown inside the node is created. After disabling fast 404 all the derivatives was created.

dquark3’s picture

Title: Fast 404 Breaks Image Cache » Confirming issue
FiNeX’s picture

Exactly. I suggest to add a warning on the module page until a fix would be created. Thanks!

pjcdawkins’s picture

Title: Confirming issue » Fast 404 Breaks Image Cache

I don't think dquark3 meant to change the issue title.

hansrossel’s picture

Priority: Major » Critical

Looks critical to me as image styles are part of the default content types of D7 core.

soyarma’s picture

This seems a bit odd because its an if/else, so one of those options will return TRUE (allow the path to go through).

If you're still interested in making sure this works could you provide for me the URL string of a file that doesn't get its images pre-generated when you use fast_404?

FiNeX’s picture

Well... any imagecache path with a not yet generated image, like "/files/imagecache/presetname/image.jpg" if the original image.jpg is placed on "/files/image.jpg" and "/files/imagecache/presetname/image.jpg" has not been generated yet.

soyarma’s picture

The reason I'm uncertain why this wouldn't be working for you is because this is the relevant part of the code:

  // Check to see if the URL is an imagecache URL. Those are handled via Drupal
  if (strpos($_SERVER['QUERY_STRING'], 'imagecache')) {

    // Check to see if we will allow anon users to access this url
    if (variable_get('fast_404_allow_anon_imagecache', TRUE)) {
      // If anonymous can access then anyone can and we'll just pass on by
      return TRUE; 
    }

You'll see that if we find 'imagecache' in the QUERY_STRING and if fast_404_allow_anon_imagecache is set to TRUE, we return TRUE, which allows the URL to pass to Drupal.

Though, now that I look at this I've remembered that you can't count on QUERY_STRING to be there and in the D7 branch it may not exist. The D7 branch has logic to check the REQUEST_URI as well. I'll port that back to D6 and commit to the dev branch.

soyarma’s picture

This is now committed to 6.x-1.x

soyarma’s picture

Status: Active » Closed (fixed)

Whoops, meant to close this a year ago!