Announcement

#1 2023-07-23 18:46:38

robebo
Member
2023-07-23
3

Fatal error: Uncaught mysqli_sql_exception: Data too long

Hello,

I am using Piwigo 13.8 under Ubuntu 23.04 in a Proxmox CT.

When I want to set a photo as an album picture and click on Save Settings, I get this error message:

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

Does anyone have an idea what I need to do to fix this error?

Thank you very much.



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-23 18:44:17]
    MySQL: 10.11.2-MariaDB-1 [2023-07-23 16:44:17]
    Grafikbibliothek: GD 2.3.3
    Größe des Cache 100.79 Mo   berechnet vor 26 Minuten Aktualisieren

Liste der aktivierten Plugins 2

    Additional Pages
    Admin Tools

Offline

 

#2 2023-07-23 21:31:52

erAck
Only trying to help
2015-09-06
2091

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long

Doesn't it also display at least part of the SQL query with the table name of which `name` would be too long?

Other than that just a guess: is the category's description too long and when read and rewritten as UTF-8 being more than 255 code points?


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

Offline

 

#3 2023-07-24 00:55:15

TOnin
Member
1970-01-01
106

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long

Hello,
From the classic category page
Admin Tools > Tools > check box displaying SQL queries
May it help?

Offline

 

#4 2023-07-24 09:32:40

robebo
Member
2023-07-23
3

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long

However, I have just noticed something else.
The error occurs when I want to set a picture as an album picture for a superordinate album. I go to the settings of the picture.
The following title of the picture is displayed:

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 />

If I now manually assign a title for the picture, make the album picture settings and then save, everything works.

But where does this cryptic name for the title of the picture come from?

I transfer the images from Lightroom using a Lightroom plugin for Piwigo. Is something being transferred incorrectly? Is there possibly a setting to be made somewhere so that if there is no title, for example, the file name is used as the title?

Offline

 

#5 2023-07-24 10:37:08

erAck
Only trying to help
2015-09-06
2091

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long

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.


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

Offline

 

#6 2023-07-24 11:34:02

robebo
Member
2023-07-23
3

Re: Fatal error: Uncaught mysqli_sql_exception: Data too long

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;

Done with the Plugin LocalFilesEditor .... and it works :-)

Thank you for your help.

Offline

 

Board footer

Powered by FluxBB

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