Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed Ajax request or invalid JSON returned. - When trying to add a reviewer to a submission. #9724

Closed
nev888 opened this issue Feb 11, 2024 · 4 comments

Comments

@nev888
Copy link

nev888 commented Feb 11, 2024

Describe the bug
When I click on 'Add Reviewer' button to add a reviewer to a submission the browser shows a pop box with 'Failed Ajax request or invalid JSON returned.' message

In the OJS log the following fatal errors appear:
[11-Feb-2024 12:33:58 UTC] PHP Fatal error: Uncaught Error: Call to a member function getLocalizedData() on null in **/lib/pkp/controllers/grid/users/reviewer/form/ReviewerForm.php:482 Stack trace: #0 **/lib/pkp/controllers/grid/users/reviewer/form/AdvancedSearchReviewerForm.php(253): PKP\controllers\grid\users\reviewer\form\ReviewerForm->getEmailTemplates() #1 **/lib/pkp/controllers/grid/users/reviewer/form/ReviewerForm.php(264): PKP\controllers\grid\users\reviewer\form\AdvancedSearchReviewerForm->getEmailTemplates() #2 **/lib/pkp/controllers/grid/users/reviewer/form/AdvancedSearchReviewerForm.php(238): PKP\controllers\grid\users\reviewer\form\ReviewerForm->fetch(Object(APP\core\Request), NULL, false) #3 **/lib/pkp/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php(1092): PKP\controllers\grid\users\reviewer\form\AdvancedSearchReviewerForm->fetch(Object(APP\core\Request)) #4 **/lib/pkp/classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php(353): PKP\controllers\grid\users\reviewer\PKPReviewerGridHandler->_fetchReviewerForm(Array, Object(APP\core\Request)) #5 [internal function]: PKP\controllers\grid\users\reviewer\PKPReviewerGridHandler->showReviewerForm(Array, Object(APP\core\Request)) #6 **/lib/pkp/classes/core/PKPRouter.php(334): call_user_func(Array, Array, Object(APP\core\Request)) #7 **/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\core\Request), Array) #8 **/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPComponentRouter->route(Object(APP\core\Request)) #9 **/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch(Object(APP\core\Request)) #10 **/index.php(21): PKP\core\PKPApplication->execute() #11 {main} thrown in **/ib/pkp/controllers/grid/users/reviewer/form/ReviewerForm.php on line 482

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Submissions' section
  2. Choose a submission in 'Review' stage
  3. Click 'Add Reviewer'
  4. A pop box should appear with the error message.

What application are you using?
OJS: 3.4.0-4
OS platform: Linux
PHP version 8.2.13

Additional information
Please add any screenshots, logs or other information we can use to investigate this bug report.
Screenshot 2024-02-11 at 13 41 58

@nev888
Copy link
Author

nev888 commented Feb 14, 2024

Realised this issue caused by some corruption in the table (email_templates_default_data) which holds the email templates. I think the issue appeared after OJS upgrade done in this order (3.4.0.4 <-- 3.4.0.3 <-- 3.4.0.0 <-- 3.3.0.15 )
This was fixed by importing a this table from a correct working system.

@nev888 nev888 closed this as completed Feb 14, 2024
@asmecher
Copy link
Member

Thanks for following up with the solution, @nev888!

@Vitaliy-1
Copy link
Collaborator

@nev888,

It looks that REVIEW_REQUEST email template is missing from the OJS instance. Can you track down when it got removed?

@nev888
Copy link
Author

nev888 commented Feb 19, 2024

The error appeared after OJS upgrade wad done from 3.3.0.15 to 3.4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants