Closed (fixed)
Project:
Exif
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 May 2009 at 03:21 UTC
Updated:
6 Aug 2010 at 18:00 UTC
Jump to comment: Most recent file
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | sections.patch | 1.61 KB | drupalmonkey |
Comments
Comment #1
rapsli commentedI'm interested. Can you provide a patch, so we can get this fix into the next release?
Comment #2
drupalmonkey commentedFrom 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.
Comment #3
arski commentedfixes the issue for me, thanks a lot
Comment #4
rapsli commentedcommitted