Add discussion 500 (Internal Server Error)

Describe the problem
I get a 500 internal server error in the “Add discussion” option during the review stage. I share the log record below. The error seems to be that the “$notification” variable goes as “null”. Can you help me?

Error log

[Fri Apr 19 01:15:27.652518 2024] [:error] [pid 703096:tid 140149165028928] [remote 94.54.29.95:0] FastCGI: server "/usr/lib/cgi-bin/php-xxxx" stderr: PHP message: PHP Fatal error:  Uncaught TypeError: PKP\\mail\\mailables\\DiscussionReview::allowUnsubscribe(): Argument #1 ($notification) must be of type APP\\notification\\Notification, null given, called in /home/xxxx/xxxx/public_html/lib/pkp/controllers/grid/queries/QueriesGridHandler.php on line 688 and defined in /home/xxxx/xxxx/public_html/lib/pkp/classes/mail/traits/Unsubscribe.php:49, referer: https://xxxx.org/workflow/index/4513/3
[Fri Apr 19 01:15:27.652605 2024] [:error] [pid 703096:tid 140149165028928] [remote 94.54.29.95:0] FastCGI: server "/usr/lib/cgi-bin/php-xxxx" stderr: Stack trace:, referer: https://xxxx.org/workflow/index/4513/3
[Fri Apr 19 01:15:27.652609 2024] [:error] [pid 703096:tid 140149165028928] [remote 94.54.29.95:0] FastCGI: server "/usr/lib/cgi-bin/php-xxxx" stderr: #0 /home/xxxx/xxxx/public_html/lib/pkp/controllers/grid/queries/QueriesGridHandler.php(688): PKP\\mail\\mailables\\DiscussionReview->allowUnsubscribe(), referer: https://xxxx.org/workflow/index/4513/3
[Fri Apr 19 01:15:27.652612 2024] [:error] [pid 703096:tid 140149165028928] [remote 94.54.29.95:0] FastCGI: server "/usr/lib/cgi-bin/php-xxxx" stderr: #1 [internal function]: PKP\\controllers\\grid\\queries\\QueriesGridHandler->updateQuery(), referer: https://xxxx.org/workflow/index/4513/3
[Fri Apr 19 01:15:27.652615 2024] [:error] [pid 703096:tid 140149165028928] [remote 94.54.29.95:0] FastCGI: server "/usr/lib/cgi-bin/php-xxxx" stderr: #2 /home/xxxx/xxxx/public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(), referer: https://xxxx.org/workflow/index/4513/3
[Fri Apr 19 01:15:27.652618 2024] [:error] [pid 703096:tid 140149165028928] [remote 94.54.29.95:0] FastCGI: server "/usr/lib/cgi-bin/php-xxxx" stderr: #3 /home/xxxx/xxxx/public_html/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest(), referer: https://xxxx.org/workflow/index/4513/3
[Fri Apr 19 01:15:27.652872 2024] [fastcgi:error] [pid 703096:tid 140148457068096] [client 94.54.29.95:0] FastCGI: server "/usr/lib/cgi-bin/php-xxxx" stderr: #4 /home/xxxx/xxxx/public_html/lib/pkp/classes/co...s\\DiscussionReview::allowUnsubscribe(): Argument #1 ($notification) must be of type APP\\notification\\Notification, null given, called in /home/xxxx/xxxx/public_html/lib/pkp/controllers/grid/queries/QueriesGridHandler.php on line 688 and defined in /home/xxxx/xxxx/public_html/lib/pkp/classes/mail/traits/Unsubscribe.php:49, referer: https://xxxx.org/workflow/index/4513/3

What application are you using?
I’am using OJS 3.4.0-5

I had the same problem and found out that it only occurs when a participant in a discussion hasn’t activated notifications for ‘Discussion added’ in their notification settings. Therefore, I have enabled these types of notifications in the database for all users with the following sql-query:
delete from notification_subscription_settings where setting_value="16777249" and setting_name="blocked_notification";

@zieglcar zieglcar
quote=“zieglcar, post:2, topic:87784”]
erini etkinleştirmediğinde ortaya çıktığını öğrendim. Bu nedenle, aşağıdaki sql sorgusuyla tüm kullanıcılar için veritabanında bu tür bildirimleri etkinleştirdi
[/quote]

Thank you @zieglcar. It’s work fine.