Closed (fixed)
Project:
ImageField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2008 at 15:24 UTC
Updated:
12 Mar 2009 at 23:02 UTC
field_image_fid is trimmed in {content_type_TYPE} table,
the file in {files} table has correct id, and path, but in {content_type_TYPE} table there is fid '20' instead of '220' and '21' instead of '221'
if I manually correct it in database - it's OK, but when I edit the node again with drupal, it gets trimmed again
Comments
Comment #1
alippai commentedPS:
D6
CCK-2.0-beta
Imagefield HEAD
Comment #2
alippai commentedI found that it creates file with correct id, but after the save (not after the upload) it becomes form '231' to '031' and db it stores as '31'.
I can't find the bug in the code :S
Comment #3
jpetso commentedIssue #271017: Wrong fid in DB has been marked as a duplicate.
Comment #4
rapsli commentedfunction content_nodeapi(&$node, $op, $teaser, $page)
$node already has the wrong fid. I though do not know wher this come from?! ... remote debugger for user input would be nice. Didn't get mine to work :(
Comment #5
alippai commentedThe bug is in the delete checkbox:
It overwrites the first char of fid :S
Thank you Heine!
Comment #6
rapsli commentedand what would be the fix for it?
Comment #7
rapsli commentedadded a patch for temporerily fixing this http://drupal.org/node/271862
Comment #8
dopry commentedtry setting #tree => false on the delete element and let me know if that fixes that for you...
Comment #9
rapsli commentedthis works for me :) hurray.
Comment #10
rapsli commentedthis is probably already know, but since we are talking about the deleting issue... deleting actually doesn't work
Comment #11
nonsieDeleting doesn't work because $file['flags'] never gets set on delete.
Comment #12
quicksketchThis seems to apply to a older version of ImageField. The new ImageField doesn't even have a delete checkbox (it's now a button). There aren't any problems with deletion that I know of at this point.