Image Attach error
| Project: | Node import |
| Version: | 6.x-1.0-rc4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
MySQL 5.0.75
PHP 5.2.6-3ubuntu4.2
Apache 2.2.11
Pressflow/Drupal 6.14
Nature of error: image attach on imported "story" node type.
This is going to be a woefully thin bug report, because the actual error took place over a month ago, and we moved on, abandoning the idea of importing hundreds of old news items. I only realized the bug when I discovered that cron was failing with an error attributed to line 343 of image_attach.module. Using version 6.x-1.0-beta3 of the Image module, it looks like image_attach expected the "- None -" option to be set for every node, and when cron ran, it was looping through the nodes I didn't know had been created and trying to unset the image attachment's blank default using this code:
unset($node->iids[0])
I know that checking to see if $node->iids[0] exists might be a good patch to suggest to the Image module maintainers, but I thought I'd share it here, because it might shed some light on why the original import failed: the attached image for the imports might have to be explicitly set to 0.
