after upgrading to 4.7 I have to change all tags of type

[img_assist|fid=79|thumb=1|alt=...]

to the REAL fid that contains the thumb...

e.g. in this case I looked up the files entry that contains "thumbnail" in the filename and it work...

not sure what has changed, but it seems the "thumb=1" selection simply doesnt work anymore in img_assist in 4.7?!? why that?

Please advise ASAP - the whole site is crippled

Comments

Christoph C. Cemper’s picture

found a maybe related issue in http://drupal.org/node/63848
that is unresolved since May 17

also I found out that the new img_assist tags used in posts are somewhat INCOMPATIBLE

they lookup the image by nid, not the fid

e.g. what was

[img_assist|fid=17| ...

must now be
[img_assist|nid=1010| ...

and the new type of linking is specified by yet unknown tags..

|link=none|align=left|width=160|height=113]

It's wonderful to read that message above


Img_assist was rewritten for Drupal 4.7, so unfortunately the original img_assist for Drupal 4.6 cannot be supported by the new img_assist maintainer.

But DID THE NEW MAINTAINER, did you Benjamin ALSO plan for an upgrade scenario for existing sites?
If yes, please - where is it documented?
If no, OMG

ejk’s picture

Just made a fix in our code to support the "thumb=1" variable in legacy img_assist tags (starting on line 1239 of img_assist.module):

  // LEGACY img_assist filter tags
  } elseif ($attributes['fid']) {
    if ($attributes['thumb'] == 1)
    {
      // Get nid of original picture
      $orig = db_fetch_object(db_query('SELECT nid FROM {files} WHERE fid = %d', $attributes['fid']));
      // Get fid of corresponding thumbnail
      $thumb = db_fetch_object(db_query('SELECT fid FROM {files} WHERE filename = "thumbnail" AND nid = %d', $orig->nid));
      if ($thumb->fid > 0)
        $attributes['fid'] = $thumb->fid;
    }
    $img = img_assist_load_image($attributes['fid'], FALSE);

Not sure how to commit a patch, but this will help out those wanting to support thumbnail views on legacy img_assist tags. No need to change the fid.

darren oh’s picture

Status: Active » Closed (duplicate)

Duplicate of issue 66635.