Announcement

#1 2015-01-09 01:46:44

rbr28
Member
Bloomington, IN USA
2010-07-13
36

metadata error with trailcam photos

With only photos from my trailcam, I get the error message below on the photo page:

Warning: strip_tags() expects parameter 1 to be string, array given in /piwigo/include/functions_metadata.inc.php on line 198

This didn't always happen, but I'm not sure if it's something to do with a newer version of Piwigo (I'm running the current release), or an update to something else.  Any suggestions on how I might fix this?  The link below is just a sample photo from my gallery where you can see the error message.

http://vw.homelinux.net/z/picture.php?/ … ategory/77

Thanks,
Vern

Offline

 

#2 2015-01-20 13:17:26

matthys
Member
2014-04-02
188

Re: metadata error with trailcam photos

I just noticed I have the same problem ...

However I first thought this had to do with using " (quotes) in the description, but now removed and still an issue.

Offline

 

#3 2015-01-20 15:36:16

flop25
Piwigo Team
2006-07-06
7037

Re: metadata error with trailcam photos

hello
check the metadata using tool/metadata.php and report us any differences between working and not working pictures
could use pastebin to post the result tool/metadata.php  on 3 working and 3 not working


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2015-01-20 23:30:56

matthys
Member
2014-04-02
188

Re: metadata error with trailcam photos

flop25 wrote:

hello
check the metadata using tool/metadata.php and report us any differences between working and not working pictures
could use pastebin to post the result tool/metadata.php  on 3 working and 3 not working

This metadata.php is not really user friendly, do I need to edit this file for each picture?
And how can I check in an easy way where the photo is located?

Maybe a stupid question, but what do you mean with pastebin?

Thanks,
Matthijs

Last edited by matthys (2015-01-20 23:33:00)

Offline

 

#5 2015-01-21 00:12:01

rbr28
Member
Bloomington, IN USA
2010-07-13
36

Re: metadata error with trailcam photos

Here's one example from a non-working photo.  Since all my non-working photos are from the same trailcam, I assume there's no point in posting info from multiple photos.

There are a few things I can see here that might be potential problems.  Is the first line with the %G value potentially the problem, given the error message that I get?  Maybe I'll just try stripping some random metadata from the images, since there's a lot I don't care about.


Informations are read from bobcat21.jpg


IPTC Fields in bobcat21.jpg

1#090 = %G
2#055 = 20141228
2#060 = 012559+0000
2#065 = digiKam
2#070 = 4.5.0
2#120 = M2E1L0-7R350B300


EXIF Fields in bobcat21.jpg

Array
(
    [FileName] => bobcat21.jpg
    [FileDateTime] => 1421794934
    [FileSize] => 233502
    [FileType] => 2
    [MimeType] => image/jpeg
    [SectionsFound] => ANY_TAG, IFD0, COMMENT, EXIF, INTEROP
    [COMPUTED] => Array
        (
            [html] => width="920" height="690"
            [Height] => 690
            [Width] => 920
            [IsColor] => 1
            [ByteOrderMotorola] => 0
            [ApertureFNumber] => f/2.8
            [UserComment] => M2E1L0-7R350B300
            [UserCommentEncoding] => ASCII
            [Copyright] => Copyright 2002
        )

    [ACDComment] => digiKam-4.5.0
    [ImageWidth] => 920
    [ImageLength] => 690
    [DocumentName] => PICT0329.JPG
    [ImageDescription] => M2E1L0-7R350B300
    [Make] =>
    [Model] =>
    [Orientation] => 1
    [XResolution] => 288/3
    [YResolution] => 288/3
    [ResolutionUnit] => 2
    [Software] => BS680BWNx02020
    [DateTime] => 2014:12:28 01:25:59
    [YCbCrPositioning] => 2
    [UndefinedTag:0x4746] => 0
    [UndefinedTag:0x4749] => 0
    [Copyright] => Copyright 2002
    [Exif_IFD_Pointer] => 358
    [COMMENT] => Array
        (
            [0] => M2E1L0-7R350B300
        )

    [ExposureTime] => 0/10000
    [FNumber] => 2800/1000
    [ExposureProgram] => 3
    [ISOSpeedRatings] => 100
    [ExifVersion] => 0210
    [DateTimeOriginal] => 2014:12:28 01:25:59
    [DateTimeDigitized] => 2014:12:28 01:25:59
    [ComponentsConfiguration] => 
    [CompressedBitsPerPixel] => 4837960/5038848
    [ShutterSpeedValue] => 0/10000
    [ApertureValue] => 28/10
    [ExposureBiasValue] => Array
        (
            [0] => 36
            [1] => 0
            [2] => 18
            [3] => 0
        )

    [MaxApertureValue] => 28/10
    [MeteringMode] => 1
    [LightSource] => 1
    [Flash] => 0
    [MakerNote] =>
    [UserComment] => ASCIIM2E1L0-7R350B300
    [FlashPixVersion] => 0100
    [ExifImageWidth] => 920
    [ExifImageLength] => 690
    [RelatedSoundFile] => RelatedSound
    [InteroperabilityOffset] => 1290
    [ExposureIndex] => 1/1
    [SensingMethod] => 2
    [FileSource] =>
    [SceneType] =>
    [InterOperabilityIndex] => R98
    [InterOperabilityVersion] => 0100
)

Offline

 

#6 2015-01-21 00:56:48

rbr28
Member
Bloomington, IN USA
2010-07-13
36

Re: metadata error with trailcam photos

Well, I'm not exactly sure what the problem is but all I did is edit the metadata in Digikam, to add the Make and Model information.  Now I don't get the error.  I'll test on the rest of the images just to make sure.  Below is the information from the same file after editing.  I'll check more carefully to see if anything else changed other than the two fields I edited.


Informations are read from bobcat21.jpg


IPTC Fields in bobcat21.jpg

1#090 = %G
2#055 = 20141228
2#060 = 012559+0000
2#065 = Kipi-plugins
2#070 = 4.6.0
2#120 = M2E1L0-7R350B300


EXIF Fields in bobcat21.jpg

Array
(
    [FileName] => bobcat21.jpg
    [FileDateTime] => 1421796185
    [FileSize] => 233523
    [FileType] => 2
    [MimeType] => image/jpeg
    [SectionsFound] => ANY_TAG, IFD0, COMMENT, EXIF, INTEROP
    [COMPUTED] => Array
        (
            [html] => width="920" height="690"
            [Height] => 690
            [Width] => 920
            [IsColor] => 1
            [ByteOrderMotorola] => 0
            [ApertureFNumber] => f/2.8
            [UserComment] => M2E1L0-7R350B300
            [UserCommentEncoding] => ASCII
            [Copyright] => Copyright 2002
        )

    [ACDComment] => Kipi-plugins-4.6.0
    [ImageWidth] => 920
    [ImageLength] => 690
    [DocumentName] => PICT0329.JPG
    [ImageDescription] => M2E1L0-7R350B300
    [Make] => Bushnell
    [Model] => Trailcam
    [Orientation] => 1
    [XResolution] => 288/3
    [YResolution] => 288/3
    [ResolutionUnit] => 2
    [Software] => BS680BWNx02020
    [DateTime] => 2014:12:28 01:25:59
    [YCbCrPositioning] => 2
    [UndefinedTag:0x4746] => 0
    [UndefinedTag:0x4749] => 0
    [Copyright] => Copyright 2002
    [Exif_IFD_Pointer] => 368
    [COMMENT] => Array
        (
            [0] => M2E1L0-7R350B300
        )

    [ExposureTime] => 1/10000
    [FNumber] => 14/5
    [ExposureProgram] => 3
    [ISOSpeedRatings] => 100
    [ExifVersion] => 0210
    [DateTimeOriginal] => 2014:12:28 01:25:59
    [DateTimeDigitized] => 2014:12:28 01:25:59
    [ComponentsConfiguration] => 
    [CompressedBitsPerPixel] => 4837960/5038848
    [ShutterSpeedValue] => 664385619/50000000
    [ApertureValue] => 297085365/100000000
    [ExposureBiasValue] => 36/1
    [MaxApertureValue] => 28/10
    [MeteringMode] => 1
    [LightSource] => 1
    [Flash] => 0
    [MakerNote] =>
    [UserComment] => ASCIIM2E1L0-7R350B300
    [FlashPixVersion] => 0100
    [ExifImageWidth] => 920
    [ExifImageLength] => 690
    [RelatedSoundFile] => RelatedSound
    [InteroperabilityOffset] => 1300
    [ExposureIndex] => 100/1
    [SensingMethod] => 2
    [FileSource] => 3
    [SceneType] =>
    [InterOperabilityIndex] => R98
    [InterOperabilityVersion] => 0100
)

Offline

 

#7 2015-01-21 01:02:39

rbr28
Member
Bloomington, IN USA
2010-07-13
36

Re: metadata error with trailcam photos

There are a few other parameters that were changed by software when I made the two edits, none look relevant except possibly the FileSource which was also empty before editing and changed to '3' after editing.  So, it seems like either the Make, Model, FileSource, or some combination of those fields cannot be empty.  That seems strange to me, shouldn't the code handle an empty value for any of those fields?

Offline

 

#8 2015-01-21 09:42:34

matthys
Member
2014-04-02
188

Re: metadata error with trailcam photos

Interesting ... because I modified my Exif with Exif Pilot to add coordinates to it.
Not using trailcam, but it seems to be related with Exif information in general.

Here one of mine faulty one;

Informations are read from 20150103182245-03fdd7f7.jpg


IPTC Fields in 20150103182245-03fdd7f7.jpg

1#090 = %G
2#000 = 
2#055 = 20150102
2#060 = 135716
2#080 = Matthijs van Wageningen


EXIF Fields in 20150103182245-03fdd7f7.jpg

Array
(
    [FileName] => 20150103182245-03fdd7f7.jpg
    [FileDateTime] => 1420305765
    [FileSize] => 263084
    [FileType] => 2
    [MimeType] => image/jpeg
    [SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS
    [COMPUTED] => Array
        (
            [html] => width="2400" height="1600"
            [Height] => 1600
            [Width] => 2400
            [IsColor] => 1
            [ByteOrderMotorola] => 0
            [CCDWidth] => 15mm
            [ApertureFNumber] => f/7.1
            [Thumbnail.FileType] => 2
            [Thumbnail.MimeType] => image/jpeg
        )

    [Make] => Canon
    [Model] => Canon EOS 30D
    [Orientation] => 1
    [XResolution] => 2400000/10000
    [YResolution] => 2400000/10000
    [ResolutionUnit] => 2
    [Software] => Adobe Photoshop CS5.1 Windows
    [DateTime] => 2015:01:03 18:20:40
    [Artist] => Matthijs van Wageningen
    [Exif_IFD_Pointer] => 256
    [GPS_IFD_Pointer] => 816
    [THUMBNAIL] => Array
        (
            [Compression] => 6
            [XResolution] => 72/1
            [YResolution] => 72/1
            [ResolutionUnit] => 2
            [JPEGInterchangeFormat] => 1058
            [JPEGInterchangeFormatLength] => 2511
        )

    [ExposureTime] => 1/1000
    [FNumber] => 71/10
    [ExposureProgram] => 3
    [ISOSpeedRatings] => 160
    [UndefinedTag:0x8830] => 0
    [ExifVersion] => 0221
    [DateTimeOriginal] => 2015:01:02 13:57:16
    [DateTimeDigitized] => 2015:01:02 13:57:16
    [ShutterSpeedValue] => 9965784/1000000
    [ApertureValue] => 5655638/1000000
    [ExposureBiasValue] => 0/3
    [MaxApertureValue] => 434375/100000
    [MeteringMode] => 3
    [Flash] => 16
    [FocalLength] => 160/1
    [ColorSpace] => 65535
    [ExifImageWidth] => 2400
    [ExifImageLength] => 1600
    [FocalPlaneXResolution] => 3504000/885
    [FocalPlaneYResolution] => 2336000/590
    [FocalPlaneResolutionUnit] => 2
    [CustomRendered] => 0
    [ExposureMode] => 0
    [WhiteBalance] => 0
    [SceneCaptureType] => 0
    [UndefinedTag:0xA430] => Matthijs van Wageningen
    [UndefinedTag:0xA431] => 720513168
    [UndefinedTag:0xA432] => Array
        (
            [0] => 70/1
            [1] => 300/1
            [2] => 0/0
            [3] => 0/0
        )

    [UndefinedTag:0xA434] => EF70-300mm f/4-5.6 IS USM
    [GPSVersion] => 
    [GPSLatitudeRef] => N
    [GPSLatitude] => Array
        (
            [0] => 52/1
            [1] => 18/1
            [2] => 79726/1391
        )

    [GPSLongitudeRef] => E
    [GPSLongitude] => Array
        (
            [0] => 4/1
            [1] => 48/1
            [2] => 141273/2500
        )

    [GPSAltitudeRef] =>
    [GPSAltitude] => 39/1
)

I notice for example strange characters for GPSVersion though if I check with an Exif viewer I get:
GPS Version ID = 0x02,0x03,0x00,0x00

PS .. I just notice when I post this, the strange characters will be empty (seems to have to do with the forum I guess). Check out the raw format at http://pastebin.com/K3jFK2yF

Fields with strange characters are for me; IPTC 090 and 000 and Exif GPSVersion (they are NOT empty)

Last edited by matthys (2015-01-21 09:45:50)

Offline

 

#9 2015-01-21 17:07:41

flop25
Piwigo Team
2006-07-06
7037

Re: metadata error with trailcam photos

thx for your efforts... somehow it helps
could you both send me at mynickname at piwigo .org one of your problematic picture plz?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2015-01-21 20:58:54

flop25
Piwigo Team
2006-07-06
7037

Re: metadata error with trailcam photos

weird weird weird... someone already had this on the french forum ; authorizing the html descriptions is a workaround but not great ...

when i was writting this current psot,, i suddently realized that the line number is wrong:
http://piwigo.org/dev/browser/branches/ … c.php#L205 205 for 2.7.3 Reupload by ftp and overwrite existing files


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2015-01-22 10:10:31

matthys
Member
2014-04-02
188

Re: metadata error with trailcam photos

flop25 wrote:

205 for 2.7.3 Reupload by ftp and overwrite existing files

Does this mean it's solved when using the latest "functions_metadata.inc.php" file?

Offline

 

#12 2015-01-22 11:40:54

flop25
Piwigo Team
2006-07-06
7037

Re: metadata error with trailcam photos

flop25 wrote:

when i was writting this current psot,, i suddently realized that the line number is wrong:
http://piwigo.org/dev/browser/branches/ … c.php#L205 205 for 2.7.3 Reupload by ftp and overwrite existing files

forget that... I looked at the future version fo the file


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#13 2015-02-22 12:33:36

matthys
Member
2014-04-02
188

Re: metadata error with trailcam photos

I wonder if there is any bug report on this ... as also in the new 2.7.4 version I still have the same problem. Tried to find any issue regarding this in the Bugtracker, but none found.

Offline

 

#14 2015-10-25 13:46:50

NBRemond
Guest

Re: metadata error with trailcam photos

Hello,
I add the same error... and in case this happend to somebody else... I have added a test "if (is_stting...)" around line 205 of function_metadata.inc.php as follow:

      if (is_string($value)) {
          $result[$key] = strip_tags($value);
      }

This seems to fix the issue.
Best regards,
Bernard.

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact