#1 2024-10-24 09:57:42

brazorf
Member
2024-10-23
3

fail to Sync IPTC Metadata, Search only reads filenames

Hi everyone,

I'm new to Piwigo and encountering a similar issue to what @axell described. None of the information from the IPTC metadata (which is visible in the gallery via the "Read Metadata" plugin) is searchable in the gallery. It seems there is something wrong with the database schema or my configuration in the LocalFiles Editor.

the solution offered by the OP in this forum thread
does not work for me. Below is my current LocalFiles Editor configuration:

<?php

$conf['derivative_default_size'] = 'medium'; //Dadurch wird die Standardbildgröße auf 'M' gesetzt
$conf['ext_imagick_dir'] = 'C:\\Program Files\\ImageMagick-7.1.1-Q16\\';
$conf['graphics_library'] = 'ext_imagick';

$conf['show_iptc']= true;
$conf['use_iptc'] = true;


$conf['show_iptc_mapping'] = array(

  'Titel'              => '2#005',  // iptc_title
  'Autor'              => '2#080',  // iptc_byline
  'Autor Titel'        => '2#085',  // iptc_byline_title
  'Autor Kontakt'      => '2#118',  // iptc_byline_contact, Namenskonvention richtet sich nach vCard specification RFC 2426 aus.
  'Schlüsselwörter'    => '2#025',  // iptc_keywords
  'Beschreibung'       => '2#120',  // iptc_caption
  'Beschreibungsautor' => '2#122',  // iptc_caption_writer, es können mehrere Beschreibungswriter angegeben werden, durch ein Komma getrennt werden
  'Ländercode'         => '2#100',  // iptc_country_code
  'Land'               => '2#101',  // iptc_country
  'Stadt'              => '2#090',  // iptc_city
  'Urheberrecht'       => '2#116'   // iptc_copyright
);

$conf['use_iptc_mapping'] = array (
  'keywords'  => '2#025',
  'author'    => '2#080',
  'name'      => '2#005',
  'caption'   => '2#120',
  'country'   => '2#101',
  'copyright' => '2#116'
);



?>



When I attempt to synchronize the metadata through the photo editing properties (clicking the sync icon with two circular arrows), I receive the following PHP error:

" ! ) Fatal error: Uncaught mysqli_sql_exception: Unknown column 'caption' in 'field list' in C:\xampp\htdocs\piwigo\include\dblayer\functions_mysqli.inc.php on line 132
( ! ) mysqli_sql_exception: Unknown column 'caption' in 'field list' in C:\xampp\htdocs\piwigo\include\dblayer\functions_mysqli.inc.php on line 132"

The issue seems to be that the piwigo_images table doesn't contain a caption column, which causes a mismatch with what Piwigo expects.



Here are the results of a few SQL queries:

SELECT*FROM piwigo_image_tag; returns an empty set
SELECT*FROM piwigo_tags; returns 18 tags imported from the pictures, and these are also shown in piwigo.

SELECT*FROM piwigo_image_tag; returned an empty set, but after having entered two new keywords from within piwigo the table has been populated with two new ids, the 19 and 20.


Therefore, it seems like something is wrong with my settings in the LocalFiles Editor or I’m overlooking something.

For context, I have reinstalled and configured Piwigo three times to ensure there were no issues with the installation itself. Unfortunately, I can't provide a link to my photo database, as I’m running it locally via XAMPP.

My Server Enviroment:

    Piwigo 15.0.0
    Betriebssystem: WINNT
    PHP: 8.2.12 (Info anzeigen) [2024-10-24 08:22:36]
    MySQL: 10.4.32-MariaDB [2024-10-24 08:22:36]
    Grafikbibliothek: GD bundled (2.1.0 compatible)  ---> actually both GD and Imagick are active but this is a topic for another post

I would really appreciate any help or guidance to resolve this issue.

Best regards,
brazorf

Offline

 

#2 2024-10-24 11:34:16

erAck
Only trying to help
2015-09-06
2235

Re: fail to Sync IPTC Metadata, Search only reads filenames

With

$conf['use_iptc_mapping'] = array (
  'keywords'  => '2#025',
  'author'    => '2#080',
  'name'      => '2#005',
  'caption'   => '2#120',
  'country'   => '2#101',
  'copyright' => '2#116'
);

you told it there would be a piwigo_images table column named caption, but there is not. In use_iptc_mapping you can map only existing columns. The predefined columns are keywords, author, name, comment. You can add other columns to the table, but there is no benefit unless you program additional SQL queries. On the fly metadata is displayed from the definitions in $conf['show_iptc_mapping'].


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2024-10-24 15:17:21

brazorf
Member
2024-10-23
3

Re: fail to Sync IPTC Metadata, Search only reads filenames

Hi erAck,

Thank you very much, that was indeed the issue, now the keywords are associated with the respective pictures. I guess the other user modified the database and the php scripts since he mapped more than the 4 values.

have a nice day!
brazorf

Offline

 

Board footer

Powered by FluxBB