Pages: 1
After my update to Piwigo 14.0.0 yesterday, I get error messages after uploading and editing new photos, i.e. when I select several photos to apply changes such as keywords, author or creation date.
Blank page with error, after editing the author:
Fatal error: Uncaught mysqli_sql_exception: Column 'object_id' cannot be null in /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php(132): mysqli->query('\nINSERT INTO `...') #1 /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php(550): pwg_query('\nINSERT INTO `...') #2 /www/htdocs/XXXXXXXXXXXgallery/include/functions.inc.php(644): mass_inserts('piwigo_activity', Array, Array) #3 /www/htdocs/XXXXXXXXXXXgallery/admin/batch_manager_global.php(246): pwg_activity('photo', Array, 'edit', Array) #4 /www/htdocs/XXXXXXXXXXXgallery/admin/batch_manager.php(814): include('/www/htdocs/w00...') #5 /www/htdocs/XXXXXXXXXXXgallery/admin.php(346): include('/www/htdocs/w00...') #6 {main} thrown in /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php on line 132
Keywords:
Fatal error: Uncaught mysqli_sql_exception: 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 ')' at line 5 in /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php(132): mysqli->query('\nSELECT\n ima...') #1 /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php(888): pwg_query('\nSELECT\n ima...') #2 /www/htdocs/XXXXXXXXXXXgallery/admin/include/functions.php(1854): query2array('\nSELECT\n ima...') #3 /www/htdocs/XXXXXXXXXXXgallery/admin/include/functions.php(1620): get_image_tag_ids(Array) #4 /www/htdocs/XXXXXXXXXXXgallery/admin/batch_manager_global.php(112): add_tags(Array, Array) #5 /www/htdocs/XXXXXXXXXXXgallery/admin/batch_manager.php(814): include('/www/htdocs/w00...') #6 /www/htdocs/XXXXXXXXXXXgallery/admin.php(346): include('/www/htdocs/w00...') #7 {main} thrown in /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php on line 132
Creation date:
Fatal error: Uncaught mysqli_sql_exception: Column 'object_id' cannot be null in /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php(132): mysqli->query('\nINSERT INTO `...') #1 /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php(550): pwg_query('\nINSERT INTO `...') #2 /www/htdocs/XXXXXXXXXXXgallery/include/functions.inc.php(644): mass_inserts('piwigo_activity', Array, Array) #3 /www/htdocs/XXXXXXXXXXXgallery/admin/batch_manager_global.php(302): pwg_activity('photo', Array, 'edit', Array) #4 /www/htdocs/XXXXXXXXXXXgallery/admin/batch_manager.php(814): include('/www/htdocs/w00...') #5 /www/htdocs/XXXXXXXXXXXgallery/admin.php(346): include('/www/htdocs/w00...') #6 {main} thrown in /www/htdocs/XXXXXXXXXXXgallery/include/dblayer/functions_mysqli.inc.php on line 132
If I then make the changes again via "Edit album photos", there is no error message.
Also everything else is running ok.
Trying to switch Php Version to 8.2 also didnt help.
Piwigo 14.0.0
Installiert auf 28 November 2020, vor 3 Jahre 2 Wochen 1 Tag
Betriebssystem: Linux
PHP: 8.2.9 (Info anzeigen) [2023-12-14 15:13:22]
MySQL: 10.6.12-MariaDB-0ubuntu0.22.04.1-log [2023-12-14 15:13:22]
Grafikbibliothek: ImageMagick 6.9.11-60
Größe des Cache 0 Mo berechnet vor 1 Jahr
Plugins:
Admin Tools
Change who added photo
Community
Fotorama
LocalFiles Editor
Photo added by
Posted Date Changer
PWG Stuffs
Offline
In your database, can you tell us what is the list of columns of table piwigo_activity? Here is mine
MariaDB [pwggit]> desc piwigo_activity; +--------------+-----------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-----------------------+------+-----+---------------------+----------------+ | activity_id | int(11) unsigned | NO | PRI | NULL | auto_increment | | object | varchar(255) | NO | | NULL | | | object_id | int(11) unsigned | NO | | NULL | | | action | varchar(255) | NO | | NULL | | | performed_by | mediumint(8) unsigned | NO | | NULL | | | session_idx | varchar(255) | NO | | NULL | | | ip_address | varchar(50) | YES | | NULL | | | occured_on | timestamp | NO | | current_timestamp() | | | details | varchar(255) | YES | | NULL | | | user_agent | varchar(255) | YES | | NULL | | +--------------+-----------------------+------+-----+---------------------+----------------+ 10 rows in set (0.001 sec)
Offline
plg wrote:
In your database, can you tell us what is the list of columns of table piwigo_activity? Here is mine
+--------------+-----------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-----------------------+------+-----+---------------------+----------------+ | activity_id | int(11) unsigned | NO | PRI | NULL | auto_increment | | object | varchar(255) | NO | | NULL | | | object_id | int(11) unsigned | NO | | NULL | | | action | varchar(255) | NO | | NULL | | | performed_by | mediumint(8) unsigned | NO | | NULL | | | session_idx | varchar(255) | NO | | NULL | | | ip_address | varchar(50) | YES | | NULL | | | occured_on | timestamp | NO | | current_timestamp() | | | details | varchar(255) | YES | | NULL | | | user_agent | varchar(255) | YES | | NULL | | +--------------+-----------------------+------+-----+---------------------+----------------+
Mine is completely the same
Offline
I'm experiencing the same problems, but notice it also occurring on Title. I found a work around. After getting the error I go back several times to the Batch Manager page, re-select whole set and don't receive the error. I hope this makes sense.
Offline
I can't reproduce. Tested on PHP 8.1 and 8.2, no problem :-/
Offline
We haven't made much changes on Batch Manager for Piwigo 14. Only this one might be a problem on your Piwigo [Github] Piwigo commit 27e81f29
When you have this error, do you select the whole set of photos?
Offline
plg wrote:
We haven't made much changes on Batch Manager for Piwigo 14. Only this one might be a problem on your Piwigo [Github] Piwigo commit 27e81f29
When you have this error, do you select the whole set of photos?
I just tested it. The error didn´t occur when I just select one photo. So, yes the error shows up when I select the whole set of new uploaded photos.
Offline
Do you have several pages of photos or just one?
Offline
and also, what web browser do you use?
Offline
Willy has found the way to reproduce the bug. You need to apply an action on the whole set twice (without reselecting it) and I can reproduce the bug. We're working on a fix.
Offline
Offline
Pages: 1