MantisBT - EXIF View
View Issue Details
0001862EXIF ViewAPIpublic2010.09.16 21:072010.09.21 23:04
fcoiffie 
plg 
normalmajoralways
closedfixed 
 
2.1.b2.1.b 
0001862: Provided date_creation field isn't stored in the database
I use pLoader and Piwigo export plugin (for Digikam). These tools provide the date_creation information through the API.

This feature worked until last Piwigo versions. I don't exactly know the version which has broken this function : it worked in May 2010 but not in July 2010.
- Open Digikam, select a photo and export it to a Piwigo gallery
- Look in the database with PhpMyAdmin
- The photo has a creation set to 0000-00-00
Other fields like name or comment are corrently set.
No tags attached.
Issue History
2010.09.16 21:07fcoiffieNew Issue
2010.09.16 21:07fcoiffiebrowser => any
2010.09.16 21:07fcoiffieWeb server => Apache 1.3.x
2010.09.17 19:41fcoiffieNote Added: 0004204
2010.09.17 22:27plgNote Added: 0004205
2010.09.17 22:28plgAssigned To => plg
2010.09.17 22:28plgStatusnew => feedback
2010.09.17 23:29fcoiffieNote Added: 0004206
2010.09.17 23:34plgNote Added: 0004207
2010.09.17 23:35plgNote Added: 0004208
2010.09.18 09:22fcoiffieNote Added: 0004209
2010.09.18 09:49fcoiffieNote Added: 0004210
2010.09.18 22:45plgNote Added: 0004214
2010.09.21 22:35plgProjectPiwigo => EXIF View
2010.09.21 22:43svnCheckin
2010.09.21 22:43svnNote Added: 0004225
2010.09.21 23:02plgStatusfeedback => closed
2010.09.21 23:02plgResolutionopen => fixed
2010.09.21 23:02plgProduct Version2.1.3 =>
2010.09.21 23:02plgFixed in Version => 2.1.b
2010.09.21 23:02plgTarget Version => 2.1.b
2010.09.21 23:04plgNote Added: 0004227

Notes
(0004204)
fcoiffie   
2010.09.17 19:41   
This is the corresponding Wireshark trace :

POST /piwigo-2.0.7/ws.php HTTP/1.1

Host: fcoiffie.free.fr

Connection: Keep-Alive

User-Agent: Mozilla/5.0 (compatible; Konqueror/4.5; Linux) KHTML/4.5.1 (like Gecko)

Pragma: no-cache

Cache-control: no-cache

Accept: text/html, image/jpeg;q=0.9, image/png;q=0.9, text/*;q=0.9, image/*;q=0.9, */*;q=0.8

Accept-Encoding: x-gzip, x-deflate, gzip, deflate

Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5

Accept-Language: en-US,fr;q=0.9,en;q=0.8

Cookie: pwg_id=422d09ef3a18a2d73605da7d4bc43490; __utmz=172764660.1283371409.30.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=freebox%20synchronisation%20freeplugs; __utma=172764660.2100664349.1216888624.1279889885.1283370065.30

Authorization: Basic ZmNvaWZmaWU6YWxlbzYxNDY=

Content-Type: application/x-www-form-urlencoded

Content-Length: 265



method=pwg.images.add&original_sum=072e53b4a97cdfb100e316fed1d29e5d&name=img_1699-img_1702&author=&categories=16&file_sum=8aace34f6b2756bd20a125949c0a6fcc&thumbnail_sum=d0c3a0949c17a4276939c21c1ac8abd5&date_creation=2010%3A09%3A05&tag_ids=&comment=img_1699-img_1702

HTTP/1.1 200 OK

Date: Fri, 17 Sep 2010 17:30:07 GMT

Server: Apache/ProXad [Aug 5 2010 16:17:11]

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Pragma: no-cache

X-Powered-By: PHP/5.1.3RC4-dev

Connection: close

Content-Type: text/xml; charset=utf-8



<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">

</rsp>
(0004205)
plg   
2010.09.17 22:27   
I think this is a "collateral" damage of 0001381 : EXIF/IPTC metadata are synchronized whatever the properties set by pLoader/Digikam.

If my feeling matches the truth, this would mean your photo doesn't have the date correctly set in its EXIF metadata. Can you provide an URL to your uploaded photo?
(0004206)
fcoiffie   
2010.09.17 23:29   
This photo has a null date_creation :
http://fcoiffie.free.fr/piwigo-2.0.7/picture.php?/1192/category/16 [^]
(0004207)
plg   
2010.09.17 23:34   
Is your configuration modified for settings $conf['use_exif'] and $conf['use_exif_mapping'] ?
(0004208)
plg   
2010.09.17 23:35   
And also for $conf['use_iptc'] and $conf['use_iptc_mapping'] ?
(0004209)
fcoiffie   
2010.09.18 09:22   
For these variables, I think that I have kept default values :

// use_exif: Use EXIF data during database synchronization with files
// metadata
$conf['use_exif'] = true;

// use_exif_mapping: same behaviour as use_iptc_mapping
$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal'
  );

// use_iptc: Use IPTC data during database synchronization with files
// metadata
$conf['use_iptc'] = false;

// use_iptc_mapping : in which IPTC fields will Piwigo find image
// information ? This setting is used during metadata synchronisation. It
// associates a piwigo_images column name to a IPTC key
$conf['use_iptc_mapping'] = array(
  'keywords' => '2#025',
  'date_creation' => '2#055',
  'author' => '2#122',
  'name' => '2#005',
  'comment' => '2#120'
  );

But, when is database synchronized with image metadata ? During the upload ? Is there an API function to call to synchronize it ?
Or is it loaded when the image is displayed ?

I can see where I can synchronize images in ./galleries but not for images uploaded by the API.
(0004210)
fcoiffie   
2010.09.18 09:49   
I modified $conf['use_iptc'] to true and uploaded again some images, and now, it works.

So, $conf['use_exif'] wasn't enough to get correct date.
What is your opinion ?
Is there a quick way to refresh metadata of previously uploaded images ?
(0004214)
plg   
2010.09.18 22:45   
I reproduce the bug when I have the plugin "EXIF View" activated. Can you:

1) confirm you also have this plugin active?
2) confirm the bug disappears when the plugin is inactive?

> But, when is database synchronized with image metadata ?
> During the upload ?

At the end of the upload.

> I can see where I can synchronize images in ./galleries but
> not for images uploaded by the API.

You currently (Piwigo 2.1) have to synchronize for each photo

1) go to any photo page (picture.php)
2) click on the "modify information" icon
3) you are on the photo management screen, click on the "synchronize" icon

If you have more than just a few photos, yes it's a bit annoying, we have to add a "synchronize metadata" method in the bulk management screen.
(0004225)
svn   
2010.09.21 22:43   
[Subversion] r6989 by plg on extension exif_view

-----[Subversion commit log]----------------------------------------------------
bug 1862 fixed: no date format on creation date
(0004227)
plg   
2010.09.21 23:04   
fcoiffie, update your plugin EXIF View to revision 2.1.b and you're done :-)