Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: alippai commentedPS:
D6
CCK-2.0-beta
Imagefield HEAD
Comment #2
alippai CreditAttribution: 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 CreditAttribution: jpetso commentedIssue #271017: Wrong fid in DB has been marked as a duplicate.
Comment #4
rapsli CreditAttribution: 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 CreditAttribution: alippai commentedThe bug is in the delete checkbox:
It overwrites the first char of fid :S
Thank you Heine!
Comment #6
rapsli CreditAttribution: rapsli commentedand what would be the fix for it?
Comment #7
rapsli CreditAttribution: rapsli commentedadded a patch for temporerily fixing this http://drupal.org/node/271862
Comment #8
dopry CreditAttribution: dopry commentedtry setting #tree => false on the delete element and let me know if that fixes that for you...
Comment #9
rapsli CreditAttribution: rapsli commentedthis works for me :) hurray.
Comment #10
rapsli CreditAttribution: 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.