Ankündigung

#1 2023-07-23 18:30:05

robebo
Mitglied
2023-07-08
4

Fatal error: Uncaught mysqli_sql_exception: Data too long for column '

Hallo,

ich nutzt Piwigo 13.8 unter Ubuntu 23.04 in einem Proxmox-CT.

Wenn ich ein Foto als Albumbild festlegen will und auf Einstellungen sichern klicke, bekomme ich diese Fehlermeldung:

Fatal error: Uncaught mysqli_sql_exception: Data too long for column 'name' at row 1 in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php(132): mysqli->query() #1 /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php(478): pwg_query() #2 /var/www/html/piwigo/admin/picture_modify.php(137): single_update() #3 /var/www/html/piwigo/admin/photo.php(68): include('...') #4 /var/www/html/piwigo/admin.php(345): include('...') #5 {main} thrown in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 132

Hat einer eine Idee, was ich tun muss, um den Fehler abzustellen?

Vielen Dank schon mal.

Offline

#2 2023-07-23 23:33:33

drlecter
Piwigo Team Moderators
2016-03-17
1056

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long for column '

Hast du ein paar Infos mehr?
- PHP Version
- Plugins
- Wie lang ist der Name/Umlaute?
Du kannst im Admin Menü unter Werkzeuge (Rechts oben nach der Anmeldung) einmal SQL Querys dir mit anzeigen lassen (ggf. im Log der DB schauen).

Offline

#3 2023-07-24 09:18:21

robebo
Mitglied
2023-07-08
4

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long for column '

Gerne, hier einmal das, was ich unter Wartung/Serverumgebung angezeigt bekomme:

Code:

Server-Umgebung
Piwigo 13.8.0 Prüfen, ob eine neue Version verfügbar ist.
Installiert auf 27 Juni 2023, vor 3 Wochen 5 Tage
Betriebssystem: Linux
PHP: 8.1.12-1ubuntu4 (Info anzeigen) [2023-07-24 09:08:22]
MySQL: 10.11.2-MariaDB-1 [2023-07-24 07:08:22]
Grafikbibliothek: GD 2.3.3
Größe des Cache 100.79 Mo   berechnet vor 14 Stunden Aktualisieren
 Liste der aktivierten Plugins2
Additional Pages
Admin Tools

Wie lang ist der Name/Umlaute?

Ich weiß hier nicht einmal, welcher Name gemeint ist :-(

(ggf. im Log der DB schauen)

Ich bin ziemlicher Piwigo-Anfänger. Wo würde ich denn das Log der DB finden?

einmal SQL Querys dir mit anzeigen lassen

Ich kann hier in den SQL-Querys nichts Auffälliges erkennen.

Code:

SELECT *
  FROM piwigo_user_infos
  WHERE user_id = 2
;
(this query time : 0.000 s)
(total SQL time  : 0.002 s)
(total time      : 0.003 s)
(num rows        : 1 )
[9] 

SELECT COUNT(*)
  FROM piwigo_caddie
  WHERE user_id = 1
;
(this query time : 0.000 s)
(total SQL time  : 0.002 s)
(total time      : 0.005 s)
(num rows        : 1 )
[10] 
SELECT COUNT(*) FROM piwigo_images
(this query time : 0.000 s)
(total SQL time  : 0.002 s)
(total time      : 0.005 s)
(num rows        : 1 )
[11] 

SELECT
    image_id
  FROM piwigo_lounge
;
(this query time : 0.000 s)
(total SQL time  : 0.002 s)
(total time      : 0.005 s)
(num rows        : 0 )
[12] 

SELECT
    id
  FROM piwigo_images
    LEFT JOIN piwigo_image_category ON id = image_id
  WHERE category_id is null
  ORDER BY id ASC
;
(this query time : 0.001 s)
(total SQL time  : 0.003 s)
(total time      : 0.006 s)
(num rows        : 0 )
[13] 

INSERT INTO
  piwigo_config (param, value)
  VALUES('fs_quick_check_last_check', '2023-07-24T09:12:39+02:00')
  ON DUPLICATE KEY UPDATE value = '2023-07-24T09:12:39+02:00'
;
(this query time : 0.000 s)
(total SQL time  : 0.003 s)
(total time      : 0.006 s)
(affected rows   : 2 )
[14] 

SELECT
    id
  FROM piwigo_images
  WHERE date_available < '2022-12-08 00:00:00'
    AND path LIKE './upload/%'
  LIMIT 5000
;
(this query time : 0.000 s)
(total SQL time  : 0.003 s)
(total time      : 0.007 s)
(num rows        : 0 )
[15] 

SELECT
    id
  FROM piwigo_images
  LIMIT 5000
;
(this query time : 0.000 s)
(total SQL time  : 0.003 s)
(total time      : 0.007 s)
(num rows        : 446 )
[16] 

SELECT
    id,
    path
  FROM piwigo_images
  WHERE id IN (36,385,272,31,420,82,275,304,407,113,85,436,214,278,320,179,441,106,416,187,42,448,256,226,66,244,406,98,270,309,218,231,142,15,68,319,402,383,230,233,41,333,158,221,194,139,159,363,166,388)
;
(this query time : 0.001 s)
(total SQL time  : 0.004 s)
(total time      : 0.008 s)
(num rows        : 50 )
[17] 

SELECT COUNT(*)
  FROM piwigo_images
;
(this query time : 0.000 s)
(total SQL time  : 0.004 s)
(total time      : 0.009 s)
(num rows        : 1 )
[18] 

SELECT COUNT(*)
  FROM piwigo_categories
;
(this query time : 0.000 s)
(total SQL time  : 0.004 s)
(total time      : 0.009 s)
(num rows        : 1 )
[19] 

SELECT COUNT(*)
  FROM piwigo_tags
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.009 s)
(num rows        : 1 )
[20] 

SELECT COUNT(*)
  FROM piwigo_image_tag
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.009 s)
(num rows        : 1 )
[21] 

SELECT COUNT(*)
  FROM piwigo_users
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.009 s)
(num rows        : 1 )
[22] 

SELECT COUNT(*)
  FROM `piwigo_groups`
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.009 s)
(num rows        : 1 )
[23] 

SELECT COUNT(*)
  FROM piwigo_rate
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.009 s)
(num rows        : 1 )
[24] 

SELECT
    SUM(nb_pages)
  FROM piwigo_history_summary
  WHERE month IS NULL
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.009 s)
(num rows        : 1 )
[25] 

SELECT
    SUM(filesize)
  FROM piwigo_images
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.010 s)
(num rows        : 1 )
[26] 

SELECT
    SUM(filesize)
  FROM piwigo_image_format
;
(this query time : 0.000 s)
(total SQL time  : 0.005 s)
(total time      : 0.010 s)
(num rows        : 1 )
[27] 

SELECT
  COUNT(*) AS ext_counter,
   SUBSTRING_INDEX(path,".",-1) AS ext,
   SUM(filesize) AS filesize
  FROM `piwigo_images`
  GROUP BY ext
;
(this query time : 0.001 s)
(total SQL time  : 0.007 s)
(total time      : 0.011 s)
(num rows        : 1 )
[28] 

SELECT SUM(filesize)
  FROM `piwigo_image_format`
;
(this query time : 0.000 s)
(total SQL time  : 0.007 s)
(total time      : 0.012 s)
(num rows        : 1 )
[29] 

  select u.id as id, ui.status
  from piwigo_users as u
    left join piwigo_user_infos as ui
        on u.id = ui.user_id
  where
    u.id in (2,1)
  ;
(this query time : 0.000 s)
(total SQL time  : 0.007 s)
(total time      : 0.013 s)
(num rows        : 2 )
[30] 

SELECT mail_address
  FROM piwigo_users
  WHERE id = 1
;
(this query time : 0.000 s)
(total SQL time  : 0.007 s)
(total time      : 0.014 s)
(num rows        : 1 )

Ich konnte jedoch gerade noch etwas anderes feststellen.
Der Fehler tritt ja auf, wenn ich ein Bild als Albumbild für ein übergeordnetes Album festlegen will. Ich gehe dazu auf die Einstellungen des Bildes.
Hier wird mir folgender Titel des Bildes angezeigt:

Code:

 <br /><b>Deprecated</b>:  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in <b>/var/www/html/piwigo/_data/templates_c/8cpdn4^46bc24a8f411b1572a3c6f53c386bf033335c57d_0.file.picture_modify.tpl.php</b> on line <b>242</b><br />

Wenn ich hier nun händisch einen Titel für das Bild vergebe, die Albumbildeinstellungen vornehme und dann abspeichere, funktioniert alles.

Wo kommt aber dieser kryptische Name für den Titel des Bildes her.

Ich übertrage die Bilder aus Lightroom heraus mit einem Lightroom-Plugin für Piwigo. Wird da etwas falsch übergeben? Ist möglicherweise irgendwo eine Einstellung vorzunehmen, dass wenn kein Titel vorhanden ist, z.B. der Dateiname als Titel verwendet wird?

Beitrag geändert von robebo (2023-07-24 09:27:43)

Offline

#4 2023-07-24 11:39:18

robebo
Mitglied
2023-07-08
4

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long for column '

Ich habe das Problem auch noch im englischsprachigen Forum gepostet. Diese  Antwort  brachte die Lösung für mich.

That's a PHP Deprecated message for functionality that will cease to work in a later PHP version. I doubt that's used as a title but only displayed in that place, but who knows.. To your local Piwigo config add

$conf['show_php_errors_on_frontend'] = false;

or suppress or better log messages to file, see [Forum, post 183126 by erAck in topic 31852] Menubar tags issue after 12.2.0 upgrade and [Forum, post 180778 by erAck in topic 31258] Error Message.

Editiert habe ich die lokale Config-Datei mit dem Plugin LocalFilesEditor.

Offline

#5 2023-07-24 13:51:17

drlecter
Piwigo Team Moderators
2016-03-17
1056

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long for column '

Deprecated Meldungen kann man erst einmal ignorieren und ausblenden.
Welches Plugin Verwendest du denn? Da gab es mal eins zu kaufen.
Der kryptische Name könnte ggf. vom Plugin kommen. Ich habe das in der Form noch nie probiert.

Offline

Brett Fußzeile

Unterstützt von FluxBB

github twitter newsletter Spenden Piwigo.org © 2002-2024 · Kontakt