Needs review
Project:
PDFThumb
Version:
7.x-1.1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2012 at 08:15 UTC
Updated:
23 Dec 2012 at 13:12 UTC
Jump to comment: Most recent file
When an entity is edited and saved a 2nd time, the first is neither updated or removed ending with 2 identical thumbnails in the media-library.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1761632-no-double-thumbnails.patch | 3.29 KB | drzraf |
| #4 | 1761632-schema-update.patch | 570 bytes | drzraf |
Comments
Comment #1
drzraf commentedThis applies when 'pdfthumb_link_files' = FALSE.
But even when we left this box (remove thumbnail if pdf removed) unchecked, we probably still want thumbnail to not be recreated again and again each time a node is updated.
The {pdfthumb} should be check for pre-existing thumbnail in *any case*.
But when it comes to the removal of the original PDF, it should only be checked if the above option is activated.
Comment #2
drzraf commentedOn a side note:
When you will delete the pdf file, the associated image file will be deleted
may be reformulated in the following fashion (IMHO clearer):
The associated image file created by pdfthumb will be deleted if you delete the original PDF file.
Comment #3
drzraf commentedthere should always be only 1 thumbnail created for a given pdf.
That is: 1 pdffid for 1 fid. In the pdfthumb, fid should be a primary unique key.
If a record exists having a fid = the current file fid we attempt to create a thumbnail from , then we should update the file whose pdffid matches.
Comment #4
drzraf commentedlet's start with this schema update ?
Comment #5
drzraf commentedplease note that timestamp are unusable for us as
file_save()enforces the update.so sad...
Comment #6
drzraf commentedthe second part.
Please note that hook_file_delete is implemented but should IMHO respect the
pdfthumb_link_filesoption isn't ?Comment #7
drzraf commentedping ?
This module is marked:
is this always the case ?