fiduswriter / ojs-fiduswriter

A Open Journal Systems (OJS) plugin to connect to Fidus Writer
GNU General Public License v2.0
1 stars 2 forks source link

Notification error #10

Closed nmueller18 closed 2 years ago

nmueller18 commented 3 years ago

With OJS 3.1.2.4, the NotificationManager throws the fatal error below in the communication between Fiduswriter and OJS. It seems that the ContextId (= journalId) is transmitted as string instead as integer as probably requested by OJS (see third line of code).

web04 php73-user: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to NotificationManagerDelegate::createNotification() must be an instance of PKPRequest, instance of MockObject given, called in /www/user/htdocs_ojs/lib/pkp/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.inc.php on line 90 and defined in /www/user/htdocs_ojs/lib/pkp/classes/notification/NotificationManagerDelegate.inc.php:59
web04 php73-user: Stack trace:
web04 php73-user: #0 /www/user/htdocs_ojs/lib/pkp/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.inc.php(90): NotificationManagerDelegate->createNotification(Object(MockObject), NULL, 16777243, '2', 1048585, 233, 2)
web04 php73-user: #1 /www/user/htdocs_ojs/lib/pkp/classes/notification/PKPNotificationManager.inc.php(345): PKPApproveSubmissionNotificationManager->updateNotification(Object(MockObject), NULL, 1048585, 233)
php73-user: #2 /www/user/htdocs_ojs/plugins/generic/fidusWriter/FidusWriterGatewayPlugin.inc.php(555): PKPNotificationManager->updateNotification(Object(MockObject), Array, NULL, 1048585, 23 in /www/user/htdocs_ojs/lib/pkp/classes/notification/NotificationManagerDelegate.inc.php on line 59
johanneswilm commented 3 years ago

@nmueller18 Thanks for reporting this. Apparently the OJS 3.1.2.x series changed quite a bit in various places (not semantic versioning) and they enabled type checking which makes this error throw. I have filed an issue in the OJS forum to find out how to proceed. See https://forum.pkp.sfu.ca/t/mock-requests-no-longer-supported-in-3-1-2-4/62859

johanneswilm commented 2 years ago

@nmueller18 I believe this issue has been resolved, correct?

nmueller18 commented 2 years ago

Yes, this can be closed now.