I'm getting this error when I update a node which I'm setting to use Exif extract.
Warning: exif_read_data(5331091573_708cc92d13_b.jpg) [function.exif-read-data]: Incorrect APP1 Exif Identifier Code in Exif->readExifTags() (line 101 of /Users/alastair/Sites/serialphoto/sites/all/modules/exif/exif.class.php).
It doesn't appear to be extracting Exif information either.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | exif-error_supression-1019248-11.patch | 463 bytes | xen |
| #10 | incorrect_app1_exif_identifier_code_file-1019248-10.patch | 2.45 KB | marsdk |
Comments
Comment #1
jphautin commentedcould you attach the image you were using when getting the error. it could help to know if it it Drupal module, drupal or php module (.so)
Comment #2
funkeyrandy commentedsame here on 7dev....not always though
Comment #3
jphautin commentedthis happens when some software used some specific identifier(s) not present in the specification of iptc or exif. To correct it, I need the file which raise the error and the 'semantic' of the field you want to use.
Comment #4
funkeyrandy commentedhere is the image...the samantic fields im using are :
iptc_object_name
iptc_caption
iptc_credit
the image is here:
http://ablevision.tv/PentagonPapers_Kins.jpg
Comment #5
jphautin commentedthanks. I should take a look as all of them are in the spec (and in the supported list of this module !).
Comment #6
jphautin commentedI am sorry bit I can not do anything for you as this is a warning raised by the apache exif module and is not linked to the code of this module. This is working at the maximum capacity of the chosen platform (apache/php) :).
Comment #7
funkeyrandy commentedok thanks but is there a suggestion as to the platform config of exif?
Comment #8
jphautin commentedNo, there is no special configuration. The only thing to do is to update to last php version (with last exif extension) and hope it manage more field. Note that the field you are using ARE correclty managed. The warning message is due to another field.
Comment #9
funkeyrandy commentedThe warning message is due to another field.
you mean another definition is firing anyway? could it be xmp? i do get the message that:
XMP library is not available SXMP library is not available
Functions SXMP are not available on the system. XMP metadata will not be extracted.
thanks!
Comment #10
marsdk commentedI have added a try-catch block around the exif_read_data() function so it now is handled without breaking and just leaves an entry in the watchdog instead.
Comment #11
xen commentedAs most users don't care about things that the exif library can't figure out, it makes sense to suppress warnings.
Patch to do this attached.
Comment #12
damienmckennaThis is a problem created by bad data. However, the module should handle these errors and not allow them to be displayed. I recommend either silently hiding the errors (#11) or at record a message that there was a problem (#10, once cleaned up).
Comment #13
damienmckennaI suggest setting the error handler to catch E_WARNING messages, that'll record a watchdog message; see #2266413: "Incorrect APP1 Exif Identifier Code" for suitable code.
Comment #15
jphautin commentedintegrated in last 7.x branch.