Announcement

#1 2018-08-12 10:40:48

ChristianSch
Member
Munich
2018-08-12
2

Problems with IPTC Metadata and Search function

Hi,

I’m new to Piwigo, but from what I’ve read, it seems to be a perfect solution for me. Unfortunately, I ran into some trouble right at the beginning, and I hope to find some help in this forum.

Background: I develop my pictures with Lightroom (5.7) and add some description to the metadata fields “Title” and “Description”. This data will end up in the IPTC fields “ObjectName” and “Caption” during the jpg export. In Piwigo, this information is shown properly after I changed:

$conf['show_iptc'] = true;
$conf['show_iptc_mapping'] = array(
  'Picture Details'        => '2#005',
  'Airline'                => '2#120'
  );

$conf['use_iptc'] = true;
$conf['use_iptc_mapping'] = array(
  'Picture Details'        => '2#005',
  'Airline'                => '2#120'
  );

in config_default.inc.php.

Environment:
XAMPP local installation
PIWIGO 2.9.4
MariaDB 10.3.8, utf8 coded database
PHP-Version: 7.2.7
Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.7

My goal: Search for the keyword provided in Object name (Picture Details) and Airline (Caption).

As written before, IPTC Metadata is shown correctly, when using “Show Metadata” in picture menu:

IPTC-Metadata

Picture Details
CDG AIRBUS 321-211 F-GTAK

Airline
JOON

In this example, e.g. I would like to search for "AIRBUS" and would like to get all pictures containing this keyword.

But: I can’t use the search option for these entries. It simply does not find it.

If I try to sync the metadata manually in the admin area: I get the following error in piwigo:

Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Details = 'CDG AIRBUS 321-211 F-GTAK',
    Airline = 'JOON',
    date_metadata_u' at line 6

UPDATE piwigo_images
  SET filesize = '377',
    width = '1280',
    height = '854',
    date_creation = '2018-05-25 18:24:26',
    Picture Details = 'CDG AIRBUS 321-211 F-GTAK',
    Airline = 'JOON',
    date_metadata_update = '2018-08-12'
  WHERE id = '7' in C:\xampp\htdocs\wordpress\pictures\include\dblayer\functions_mysqli.inc.php on line 845

May be, this error belongs to the same problem, because Piwigo is not able to store metadata in the database.

I realy hope to get some help or ideas here, of what I’m doing wrong.

Thanks,
Christian




Piwigo version:
PHP version: 7.2.7
MySQL version: 10.3.8
Piwigo URL: locally, XAMPP

Offline

 

#2 2018-08-12 20:51:09

executive
Member
2017-08-16
1214

Re: Problems with IPTC Metadata and Search function

Hi Christian. Welcome to the forum.

Code:

$conf['use_iptc_mapping'] = array(
  'Picture Details'        => '2#005',
  'Airline'                => '2#120'
  );

"Picture Details" and "Airline" are not valid Piwigo keys.

They should be:
(change with LocalFiles Editor)

Code:

$conf['use_iptc_mapping'] = array(
  'name'            => '2#005',
  'comment'         => '2#120',
  );

The values will appear in the image "Title" and "Description" fields, respectively. Unfortunately, they cannot be changed or added.

You can also add

Code:

  'keywords'        => '2#025',

which will import Lightroom keywords into the Piwigo database.

All of these fields (title, description, keywords) are searchable. I have tested it myself.

Give that a try and let us know how you get on.

Further reading

Offline

 

#3 2018-08-13 17:09:11

ChristianSch
Member
Munich
2018-08-12
2

Re: Problems with IPTC Metadata and Search function

Hi,

yes, thank you very much for your support. Now it works perfect. My fault. I did not understand how to use the "use_iptc_mapping" array correctly.

Offline

 

Board footer

Powered by FluxBB

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