This is a complement about this post which is closed so I couldn’t answer.
First, thanks to Alec Smecher for the answer. The corrected code works.
Second, there is in the same page the same problem for the latest entry (« Version(s) révisée(s) », “Revised Versions” I guess), which is not corrected by this patch; the log message is then
PHP Fatal error: Declaration of ManageCopyeditFilesForm::execute($stageSubmissionFiles, $fileStage = null) must be compatible with ManageSubmissionFilesForm::execute($stageSubmissionFiles = null, $fileStage = null, …$functionArgs) in /var/www/html/ojs-3.3.0-11/lib/pkp/controllers/grid/files/copyedit/form/ManageCopyeditFilesForm.inc.php on line 33
I prefer to signal it, just in case this one was not already catched for the next update… I guess the problem is similar.
Best regards,
So this is another follow up. In my case the two-line quick fix also solved only uploading to ‘Draft files’ grid, uploading to ‘Copyedited’ grid is still affected. Moreover, the same issue concerns uploading to ‘Review files’ grid at the ‘Review’ stage of the submission.
Those are from the PHP access log; they do show a 500 response (Internal Server Error) but don’t include the error message itself. You’ll need to look for the equivalent entries in the PHP error log.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher
Thanks for the reply. Unfortunately the error logs for today show only some irrelevant entries (unsuccessful external exploit attempts). It’s possible that the error reporting settings on the server side are weird. I’ll try to copy the application to the (similar) environment that I have more control over and recreate the bug. Then I’ll post the logs here.
I’ve been struggling with similar error and searching this forum upside down and came up with this post, its fresh and new, so i wont open another thread, will wait for a solutions on this one.
Here are some error logs from chrome console.
This is happening only at Journal>Sections>Create section or when you try to edit any section there. Please if you know to point me to the right direction i will be happy. Thanks.
I can confirm that I’ve encountered the same problem in my installation. The associated logs are below (adding and editing a journal section, respectively).
[Mon Sep 05 10:53:04.005152 2022] [php:error] [pid 19880:tid 1856] [client ::1:50524] PHP Fatal error: Uncaught Error: Non-static method PKPApplication::getRequest() cannot be called statically in C:\\xampp\\htdocs\\zfn_ojs3\\plugins\\generic\\openAIRE\\OpenAIREPlugin.inc.php:102\nStack trace:\n#0 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\plugins\\HookRegistry.inc.php(107): OpenAIREPlugin->initDataSectionFormFields('sectionform::in...', Array)\n#1 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\form\\Form.inc.php(237): HookRegistry::call('sectionform::in...', Array)\n#2 C:\\xampp\\htdocs\\zfn_ojs3\\controllers\\grid\\settings\\sections\\form\\SectionForm.inc.php(80): Form->initData()\n#3 C:\\xampp\\htdocs\\zfn_ojs3\\controllers\\grid\\settings\\sections\\SectionGridHandler.inc.php(195): SectionForm->initData()\n#4 C:\\xampp\\htdocs\\zfn_ojs3\\controllers\\grid\\settings\\sections\\SectionGridHandler.inc.php(179): SectionGridHandler->editSection(Array, Object(Request))\n#5 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\PKPRouter.inc.php(395): SectionGridHandler->addSection(Array, Object(Request))\n#6 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#7 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#8 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#9 C:\\xampp\\htdocs\\zfn_ojs3\\index.php(68): PKPApplication->execute()\n#10 {main}\n thrown in C:\\xampp\\htdocs\\zfn_ojs3\\plugins\\generic\\openAIRE\\OpenAIREPlugin.inc.php on line 102, referer: http://localhost/zfn_ojs3/index.php/zfn/management/settings/context
[Mon Sep 05 10:53:09.308303 2022] [php:error] [pid 19880:tid 1856] [client ::1:50528] PHP Fatal error: Uncaught Error: Non-static method PKPApplication::getRequest() cannot be called statically in C:\\xampp\\htdocs\\zfn_ojs3\\plugins\\generic\\openAIRE\\OpenAIREPlugin.inc.php:102\nStack trace:\n#0 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\plugins\\HookRegistry.inc.php(107): OpenAIREPlugin->initDataSectionFormFields('sectionform::in...', Array)\n#1 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\form\\Form.inc.php(237): HookRegistry::call('sectionform::in...', Array)\n#2 C:\\xampp\\htdocs\\zfn_ojs3\\controllers\\grid\\settings\\sections\\form\\SectionForm.inc.php(80): Form->initData()\n#3 C:\\xampp\\htdocs\\zfn_ojs3\\controllers\\grid\\settings\\sections\\SectionGridHandler.inc.php(195): SectionForm->initData()\n#4 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\PKPRouter.inc.php(395): SectionGridHandler->editSection(Array, Object(Request))\n#5 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)\n#6 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))\n#7 C:\\xampp\\htdocs\\zfn_ojs3\\lib\\pkp\\classes\\core\\PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))\n#8 C:\\xampp\\htdocs\\zfn_ojs3\\index.php(68): PKPApplication->execute()\n#9 {main}\n thrown in C:\\xampp\\htdocs\\zfn_ojs3\\plugins\\generic\\openAIRE\\OpenAIREPlugin.inc.php on line 102, referer: http://localhost/zfn_ojs3/index.php/zfn/management/settings/context
Update:
I’m testing the whole process of publishing a document and i’m facing this error again on another page, here is a screen shot. This is copyediting process before publishing the document. Draft Files > Upload/Select files, when i click the upload button it shows the following error.
EDIT1:
Tested the copyedited button to upload files, getting the same error.
EDIT2:
Changing the PHP version from 8.1 to 7.4 fixed the problem at draft files upload and copyedited files upload, the create new section or edit section problem still exists.
@jhrs Good catch. In my case downgrading PHP version to 7.4. fixed both issues. @asmecher It seems that the problem is PHP 8.x related. Note that PHP 8.0.x is one of recommended configurations in readme.md.
@p_urbanczyk I’m glad that you fixed your problem. Mine still exists, on the section menu only… tried few versions for php including 8.0 and the sections menu still gives an error. Only 7.4 version of PHP works on file upload at copyediting part, the rest versions give me error.
@asmecher , thanks for the input. Disabling OpenAIRE plugin in PHP 8.0.x environment indeed fix the @jhrs 's issue with creating/editing new journal section.
To resolve the issue with uploading files to the ‘Copyedited’ grid at the ‘Copyediting’ stage and to ‘Review files’ grid at the ‘Review’ stage in PHP 8.0.x one need to edit out the the function execute parameters in similar manner as it is done here in two other places, namely in controllers/grid/files/copyedit/form/ManageCopyeditFilesForm.inc.php on line 33 and controllers/grid/files/review/form/ManageReviewFilesForm.inc.php on line 88.
Unfortunately it looks like a backwards-incompatible change was introduced late in the PHP 8.0.x dev cycle; this didn’t affect previous releases of PHP 8.0. But I’ll release OJS/OMP/OPS 3.3.0-12 soon to resolve them.
Regards,
Alec Smecher
Public Knowledge Project Team
Yes. The problem with OpenAIRE plugin causing the “Failed Ajax request” that gives the PHP error message while adding/editing journal section occurs with the latest OJS version (3.3.0.11) running on PHP 8.0+ server.
@asmecher So there is no fix yet for Journal>Sections and create new section or edit an existing section? Here is a picture with information.
@p_urbanczyk When sections part is fixed, i will try and upgrade the php version and check if i can fix the error on copyediting stage on submission and upload files.