Closed (fixed)
Project:
Image Upload
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2008 at 15:17 UTC
Updated:
21 Jan 2009 at 13:20 UTC
I've done a print_r($node), and while my image shows up, the associated term_name $node->image['term_name'] does not exist, even though it has been specifically set in the content edit. The placeholder term_name is in the array, but the value is blank.
Comments
Comment #1
smanes commentedI encountered the same thing. The Category pulldown is getting populated with the wrong tids (in my case, 2 and 3 when it should be 79 and 80). As a result, term_name winds up blank in the node aggregate.
In function _image_upload_form() , there's an array_merge which is clobbering the tids:
_image_upload_form_get_terms() actually returns this:
But after the array_merge to prepend the "Please Select" prompt, the array looks like this:
The select value is then assigned:
Except that's not a tid but a row enumeration in the array.
The PHP array_merge() function has an unexpected side-effect.: it renumbers numeric keys. So I changed...
to...
and I got the pulldown I expected:
Comment #2
bojanz commentedThanks for the fix, will issue a new version right away.