The BB creates a SQL string to insert the data into the notifications table twice. Because the key is unique, mysql naturally generates the error message. Question is why is the notification table entry being duplicated? Is there possibly a problem with some entry or other data in the database which was upgraded from an old version (3.1.9).
Thanks in advance for any pointers, Steve.
PHPBB version: 3.3.2
PHP version: 7.4.11
Code: Select all
General Error
SQL ERROR [ mysqli ]
Duplicate entry '5-43094-17874-3' for key 'PRIMARY' [1062]
SQL
INSERT INTO phpbb_notification_emails (item_id, notification_type_id, item_parent_id, user_id) VALUES (43094, 5, 17874, 3), (43094, 5, 17874, 3)
BACKTRACE
FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()
FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 1023
CALL: trigger_error()
FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 195
CALL: phpbb\db\driver\driver->sql_error()
FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 682
CALL: phpbb\db\driver\mysqli->sql_query()
FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 393
CALL: phpbb\db\driver\driver->sql_multi_insert()
FILE: [ROOT]/phpbb/db/sql_insert_buffer.php
LINE: 138
CALL: phpbb\db\driver\factory->sql_multi_insert()
FILE: [ROOT]/phpbb/notification/method/email.php
LINE: 118
CALL: phpbb\db\sql_insert_buffer->flush()
FILE: [ROOT]/phpbb/notification/manager.php
LINE: 403
CALL: phpbb\notification\method\email->notify()
FILE: [ROOT]/phpbb/notification/manager.php
LINE: 295
CALL: phpbb\notification\manager->add_notifications_for_users()
FILE: [ROOT]/phpbb/notification/manager.php
LINE: 266
CALL: phpbb\notification\manager->add_notifications()
FILE: [ROOT]/includes/functions_posting.php
LINE: 2400
CALL: phpbb\notification\manager->add_notifications()
FILE: [ROOT]/posting.php
LINE: 1504
CALL: submit_post()