Hi,

here is the scenario:

1. Open page to create image node.
2. Select image file to upload.
3. Select gallery (I think this step is irrelevant).
4. Forget to enter node title.
5. Click Save button.
6. Drupal says that 'Title' field is mandatory and returns to the page.
7. Enter a title.
8. Click Save button.
9. Drupal creates image node.

Results:
1. The node is linked to a image that has name ending with '_0'.
2. Original image, without '_0' in its name resides in the /sites/default/files/images but does not show in the image gallery -- obviously, there is no node for it.

This image is 'orphan' - Drupal (or at least I) is not able to use it, but it is seen it in the SQL database dump, in 'drupal_files' table:

 (229,1,'template_ol8.jpg','/tmp/template_ol8.jpg','image/jpeg',35118,0,1239352013),
 (230,1,'_original','sites/default/files/images/template_ol8.jpg','image/jpeg',35118,1,1239352013),
 (231,1,'thumbnail','sites/default/files/images/template_ol8.thumbnail.jpg','image/jpeg',3825,1,1239352013),
 (233,1,'_original','sites/default/files/images/template_ol8_0.jpg','image/jpeg',35118,1,1239352058),
 (232,1,'template_ol8.jpg','/tmp/template_ol8.jpg','image/jpeg',35118,0,1239352058),
 (234,1,'thumbnail','sites/default/files/images/template_ol8_0.thumbnail.jpg','image/jpeg',3825,1,1239352058),

Questions:
Is it possible to reassign existing already uploaded image to a image node?
Is it possible to remove such called by me 'orphan' images?

Ivan

Comments

jwalkerbg’s picture

STOP, STOP

My fault. There is no error.
Please ignore this issue.
Sorry.
Ivan.

joachim’s picture

Status: Active » Closed (fixed)

Ok :)