OJS 3.4 latest docker plugin error - just after installing

I have latest 3.4 OJS in docker. Plugins directory as persistent volume. I install Plugin StrikePlagiarism.com - it is installig OK.

But, when I come back on this page few days later, I see:

I have checked logs…

[Tue Jan 07 12:48:10.918004 2025] [php:error] [pid 19:tid 19] [client 192.168.1.10:42192] PHP Fatal error:  Uncaught Error: Call to a member func  
tion getId() on null in /var/www/html/plugins/generic/plagiat/PlagiatPlugin.php:186\nStack trace:\n#0 [internal function]: APP\\plugins\\generic\  
\plagiat\\PlagiatPlugin->plagiatTmplFetchHandler()\n#1 /var/www/html/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array()\n#2 /var/www/h  
tml/lib/pkp/classes/plugins/Hook.php(113): PKP\\plugins\\Hook::run()\n#3 /var/www/html/lib/pkp/classes/template/PKPTemplateManager.php(1204): PKP  
\\plugins\\Hook::call()\n#4 /var/www/html/lib/pkp/classes/controllers/grid/GridHandler.php(1174): PKP\\template\\PKPTemplateManager->fetch()\n#5  
/var/www/html/lib/pkp/classes/controllers/grid/GridHandler.php(1138): PKP\\controllers\\grid\\GridHandler->renderRowInternally()\n#6 /var/www/htm  
l/lib/pkp/classes/controllers/grid/GridHandler.php(1188): PKP\\controllers\\grid\\GridHandler->renderRowsInternally()\n#7 /var/www/html/lib/pkp/c  
lasses/controllers/grid/GridHandler.php(1063): PKP\\controllers\\grid\\GridHandler->renderGridBodyPartsInternally()\n#8 /var/www/html/lib/pkp/cla  
sses/controllers/grid/GridHandler.php(735): PKP\\controllers\\grid\\GridHandler->doSpecificFetchGridActions()\n#9 [internal function]: PKP\\contr  
ollers\\grid\\GridHandler->fetchGrid()\n#10 /var/www/html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#11 /var/www/html/lib/pkp/cl  
asses/core/PKPComponentRouter.php(291): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#12 /var/www/html/lib/pkp/classes/core/Dispat  
cher.php(165): PKP\\core\\PKPComponentRouter->route()\n#13 /var/www/html/lib/pkp/classes/core/PKPApplication.php(395): PKP\\core\\Dispatcher->dis  
patch()\n#14 /var/www/html/index.php(21): PKP\\core\\PKPApplication->execute()\n#15 {main}\n  thrown in /var/www/html/plugins/generic/plagiat/Pla  
giatPlugin.php on line 186, referer: https://ojs-34-last.plgt.pl/index.php/index/admin/contexts

I have checked the source file:

/root/docker-data/ojs-34-last/volumes/plugins/generic/plagiat/PlagiatPlugin.php                                                   8722/21367              40%

        switch ($resourceName) {
            case 'controllers/grid/gridRow.tpl':
                $request = Application::get()->getRequest();
                $user = $request->getUser();
                if (!$user->hasRole([Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_MANAGER, Role::ROLE_ID_SUB_EDITOR], $request->getContext()->getId())) {
                    break;
                }

What is my question? The problems comes from:
$request->getContext()->getId()
IS this OJS function or plugin?

Hi @Adam_Jurkiewicz,

I think you’ll have to ask the author/maintainer of that plugin; I’m not familiar with it, and the fix will need to be done there. (Also, be careful about posting source code from a plugin that might not be open source! I’m not sure what the license attached to that plugin is.)

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for help. I got message from my support, what I should do more… A lot of things :wink:
I do not want to post all code, just snippet :wink: but copyright is always a problem. Best regards… I will write if I do everything.