#1 2023-12-15 07:06:45

stefano
Member
2023-12-15
3

[resolved] Piwigo 14 Error after Upgrade when editing multiple photos

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

 

#2 2023-12-15 12:43:33

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

In your database, can you tell us what is the list of columns of table piwigo_activity? Here is mine

Code:

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

 

#3 2023-12-15 15:48:59

stefano
Member
2023-12-15
3

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

plg wrote:

In your database, can you tell us what is the list of columns of table piwigo_activity? Here is mine

Code:

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

 

#4 2023-12-15 23:48:36

Gapster
Member
Boston
2017-10-06
23

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

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

 

#5 2023-12-16 20:30:41

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

I can't reproduce. Tested on PHP 8.1 and 8.2, no problem :-/

Offline

 

#6 2023-12-16 20:33:56

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

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

 

#7 2023-12-18 08:59:21

stefano
Member
2023-12-15
3

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

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

 

#8 2023-12-18 10:21:07

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

Do you have several pages of photos or just one?

Offline

 

#9 2023-12-18 10:29:51

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

and also, what web browser do you use?

Offline

 

#10 2023-12-18 10:50:14

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

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

 

#11 2023-12-18 14:32:05

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [resolved] Piwigo 14 Error after Upgrade when editing multiple photos

Offline

 

Board footer

Powered by FluxBB

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