Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I've run into the same issue. After creating a new image ad, the fid attribute has the value 0 in ad_image table. The actual file entry is correctly created in the files table - by manually inserting the missing fid in ad_image the issue is solved (for this particular ad).
I'm using the core upload module (it works - verified with creation of non-ad content) and Drupal v. 5.3, Advertisement version is 5.x-1.4-1 (2008-Jan-13).
When this happens, if you go back and edit the ad (without making any changes, necessarily) and submit it, does the image then appear? In other words, does this only happen when the ad is first created?
Editing the ad (without making changes) does actually fix the problem - the correct fid is inserted into ad_image and the image is displayed correctly.
Not offhand, except I think I've duplicated it. I'm off for the weekend, but hopefully I'll get time to look into this next week. That area of the ad_image module is, ugly, so no surprise there's a bug there...
Not offhand, except I think I've duplicated it. I'm off for the weekend, but hopefully I'll get time to look into this next week. That area of the ad_image module is, ugly, so no surprise there's a bug there...
Comments
Comment #1
jeremy commentedAre you using the core drupal upload module? Is the upload module working in general?
Does the problem happen with the last stable release of the ad module?
What version of Drupal are you using? What OS? How did you track down the fid issue?
Comment #2
rasmusmohr commentedI've run into the same issue. After creating a new image ad, the fid attribute has the value 0 in ad_image table. The actual file entry is correctly created in the files table - by manually inserting the missing fid in ad_image the issue is solved (for this particular ad).
I'm using the core upload module (it works - verified with creation of non-ad content) and Drupal v. 5.3, Advertisement version is 5.x-1.4-1 (2008-Jan-13).
Comment #3
jeremy commentedWhen this happens, if you go back and edit the ad (without making any changes, necessarily) and submit it, does the image then appear? In other words, does this only happen when the ad is first created?
Comment #4
rasmusmohr commentedEditing the ad (without making changes) does actually fix the problem - the correct fid is inserted into ad_image and the image is displayed correctly.
Any clue to what's going on?
Comment #5
jeremy commentedNot offhand, except I think I've duplicated it. I'm off for the weekend, but hopefully I'll get time to look into this next week. That area of the ad_image module is, ugly, so no surprise there's a bug there...
Comment #6
jeremy commentedNot offhand, except I think I've duplicated it. I'm off for the weekend, but hopefully I'll get time to look into this next week. That area of the ad_image module is, ugly, so no surprise there's a bug there...
Comment #7
Skyery commentedThank you for answers, your tip was helpful.
Comment #8
jeremy commentedIt turned out being a very simple fix. Committed to the development branch.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.