When entering the tag information into the CCK field it is entered in the format exif_'section'_'tagname' where

'section' is the section in the metadata to look for the tag (e.g. exif, ifd0, etc...)
'tagname' is the tag to look for

However, when searching for the tag, only the 'tagname' is used. This causes issues for tag names that are in multiple section such as the 'User Comment' tag.

I have updated the exif.class.php file to correct this issue, and it seems to be working okay. If anyone is interested, I will make a patch.

CommentFileSizeAuthor
#2 sections.patch1.61 KBdrupalmonkey

Comments

rapsli’s picture

Status: Active » Postponed (maintainer needs more info)

I'm interested. Can you provide a patch, so we can get this fix into the next release?

drupalmonkey’s picture

Version: 6.x-1.x-dev » 6.x-1.2
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.61 KB

From the php documentation for the read_exif_data() function (for the third parameter):

"Specifies whether or not each section becomes an array. The sections COMPUTED, THUMBNAIL, and COMMENT always become arrays as they may contain values whose names conflict with other sections."

So even if the value given is false, the computed, thumbnails and comment sections are always arrays. Thus if you create a CCK field such as field_computed_height, it looks for array['height'] instead of array['computed']['height'] in the code.

I fixed this in the following patch, as well as taking out the for loop that set the keys to lowercase, instead using the array_change_key_case() function.

I patched against 6.x-1.2.

arski’s picture

fixes the issue for me, thanks a lot

rapsli’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.