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.

Comments

jphautin’s picture

Assigned: Unassigned » jphautin
Status: Active » Postponed (maintainer needs more info)

could 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)

funkeyrandy’s picture

same here on 7dev....not always though

jphautin’s picture

this 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.

funkeyrandy’s picture

here 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

jphautin’s picture

Status: Postponed (maintainer needs more info) » Active

thanks. I should take a look as all of them are in the spec (and in the supported list of this module !).

jphautin’s picture

Status: Active » Closed (works as designed)

I 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) :).

funkeyrandy’s picture

ok thanks but is there a suggestion as to the platform config of exif?

jphautin’s picture

No, 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.

funkeyrandy’s picture

The 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!

marsdk’s picture

I 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.

xen’s picture

Status: Closed (works as designed) » Needs review
StatusFileSize
new463 bytes

As 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.

damienmckenna’s picture

Issue summary: View changes

This 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).

damienmckenna’s picture

I 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.

  • jphautin committed 44f67a5 on 7.x-1.x authored by marsdk
    Issue #1019248 by marsdk, Xen: Incorrect APP1 Exif Identifier Code in...
jphautin’s picture

Status: Needs review » Fixed

integrated in last 7.x branch.

Status: Fixed » Closed (fixed)

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