I have content type with multi image field and have some existing content for that content type also. i installed file field path and file aliases module and then i tried to update the existing images with it[choosing Retroactive update option] and after saving the image field[file path setting].Existing image with image style disappeared.

when i tried to copy the image location of the thumbnail of existing image in node edit form, it shows

http://styles/thumbnail/http/mysite.com/models/moto/defy.jpg

but when i tried to upload a new image in node edit form,it shows the thumbnail of that image in node edit form

image location of new image thumbnail :
http://mysite/sites/default/files/styles/thumbnail/public/EX211_Thistle_...

i think something broke the path of existing image of image style .can you tell me what may be the problem and how can i clear it?

Thanks in advance!...

Comments

deciphered’s picture

Project: File (Field) Paths » File Aliases
Version: 7.x-1.0-beta3 » 7.x-1.x-dev

I'm going to move this to File Aliases as it sounds like that's likely the cause of the issue.

neRok’s picture

Problem could be the new itok system (or you havent applied the latest patches to File Aliases module).

To fix the itok problem, tweak the section of function file_aliases_load_fid($fid), which is within file_aliases.module, with the following code.

  // Render Image Style preset if applicable.
  $uri = explode('?', request_uri());
  if (isset($uri[1]) && strpos($result->filemime, 'image') === 0) {
    $image_style = $uri[1];
    $styles = image_styles();
    if (isset($styles[$image_style])) {
      $_GET[IMAGE_DERIVATIVE_TOKEN] = image_style_path_token($image_style, $result->uri);
      $arguments = array_merge(array(image_style_load($image_style), file_uri_scheme($result->uri)), explode('/', str_replace(file_uri_scheme($result->uri) . '://', '', $result->uri)));
      call_user_func_array('image_style_deliver', $arguments);
    }
  }

The new line is $_GET[IMAGE_DERIVATIVE_TOKEN] = image_style_path_token($image_style, $result->uri)

deciphered’s picture

Issue summary: View changes
Status: Active » Fixed

Issue appears to be resolved in the latest development release.

Status: Fixed » Closed (fixed)

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