Project:Image Assist
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:sun
Status:closed (fixed)

Issue Summary

As reported on g.d.o, in http://drupal.org/node/166732, http://drupal.org/node/176157 (including a patch), http://drupal.org/node/168180 and http://drupal.org/node/171524 (Image issue) some inline images disappear from contents. As far as I can tell, cron does not need to run to let this happen. It's unclear, if (any) node updates are the cause.

However, the cached content must have been updated, because those missing images are the cause for malformed urls and onclick behaviours:

<a href="http://localhost:82/files/" onclick="launch_popup(9, , ); return false;" target="_blank">

The image file, along with its derivatives, is not deleted and still resides in the files directory. However, in the files table the original image file entry is missing. The only entry found is foo.img_assist_properties.bar.

The problem is not reproducable by updating the node containing the image.

By visiting the image node, the image is missing in all sizes (certainly caused by missing entries in files table).

Uploading the same image into the same image node displays the image in the image node, including derivative sizes. However, the img_assist filter tag in the content containing that image needs to be updated to have it displayed also there.

This happens repeatedly. It's not the same image that gets lost.

http://drupal.org/node/160671 (Image issue) could be related.

Comments

#1

Now I experienced this bug several times after

  1. Inserting an image into a node using Img_Assist's filter tag
    Note: For demonstration purposes use an image from "my images" and count the number of displayed images.
  2. Going to admin/settings/image and adding/altering/removing a preset size
    Note: I did not even think of altering anything there in my initial post, so this step might not be related.
  3. Emptying Drupal's cache using devel.module's Empty cache link in the devel block.
  4. Going straight back to the node edit form of the node containing the inline image, invoke img_assist and see at least 1 image less.

#2

Assigned to:Anonymous» sun
Status:active» needs review

smk-ka and I debugged this issue thoroughly and came to the conclusion that Image Assist deletes original images from the files table if an image is smaller than a derivative size. See attached patch for a more comprehensive description.

I urge everyone to test this patch ASAP. You probably need devel module to subsequently clear all caches.

FYI: _image_get_sizes() is deprecated, also changed in this patch.

AttachmentSize
img_assist_26.patch 5.24 KB

#3

Status:needs review» fixed

Committed to 5.x.

#4

I had a quick look at the patch and also tested the current -dev version briefly, including following the procedure in comment #1. No problems so far. Good work!

#5

Status:fixed» closed (fixed)
nobody click here