Failed AJAX request or invalid JSON returned


#1

I have just upgraded from OMP 1.0.0.0-0 to 1.1.1-1, and accounted the referenced error message: “Failed AJAX request or invalid JSON returned”, when working on “Add Market” for a newly accepted book. Could someone help me figure out what went wrong, and how to resolve it?
I am a new user of OMP, and your help will be greatly appreciated.


#2

Hi @liugr,

Can you check your server’s PHP error log? There should be details there.

Regards,
Alec Smecher
Public Knowledge Project Team


#3

Dear Alec,
Many thanks. I checked /var/log/php5-fpm.log, and could not find any error message related to this. Below are the other log files. Which one should I look at, and how (some of them are not text files). I made sure that in apache2/php.ini, fpm/php.ini, and cgi/php.ini, all error logs are put under /var/log.
Best regards, GR

/var/log$ ll -t | head
total 78652
-rw-rw-r-- 1 root utmp 12672 Apr 7 15:39 wtmp
-rw-r–r-- 1 root root 5405 Apr 7 15:39 boot.log
-rw-r----- 1 root adm 1017 Apr 7 15:39 fail2ban.log
-rw-rw-r-- 1 root utmp 294044 Apr 7 15:39 lastlog
drwxr-xr-x 2 root root 12288 Apr 7 15:38 upstart/
-rw------- 1 root root 97 Apr 7 15:38 php5-fpm.log
drwxrwxr-x 15 root syslog 4096 Apr 7 15:38 ./
-rw-r----- 1 root adm 21288 Apr 7 15:38 dmesg
-rw-r–r-- 1 root root 326349 Apr 7 15:38 udev


#4

Dear Alec (and others),
Thanks again.
This problem is resolved. However, I do not know exactly what has happened. What I did was just try to fill in the information for the to-be-published book as much as possible. After I did multiple inputs in multiple places, the error was gong. It seems that if some key information is not given, one may encounter this type of error. Sorry, I do not know which the key piece of information was, because I did too many. But you got the idea…
Best, GR.


#5

Current version: 3.1.0.0 (December 12, 2017 - 09:57 PM) same proble is facing to createing meanu on home page.
image


#6

Hi @JyotiKant,

As above, please check your PHP error log for details.

Regards,
Alec Smecher
Public Knowledge Project Team


#7

text/x-generic error_log ( ASCII text, with very long lines )
[06-Jan-2018 22:40:33 Asia/Kolkata] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[06-Jan-2018 22:40:33 Asia/Kolkata] PHP Strict Standards: Declaration of OpenAIREDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 0
[06-Jan-2018 22:40:33 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:33 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:33 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:33 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:34 Asia/Kolkata] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[06-Jan-2018 22:40:34 Asia/Kolkata] PHP Strict Standards: Declaration of OpenAIREDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 0
[06-Jan-2018 22:40:34 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:34 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:34 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:34 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of OpenAIREDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuForm::fetch() should be compatible with Form::fetch($request, $template = NULL, $display = false) in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuForm.inc.php on line 20
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuForm::validate() should be compatible with Form::validate($callHooks = true) in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuForm.inc.php on line 20
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of OpenAIREDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuItemsForm::fetch() should be compatible with Form::fetch($request, $template = NULL, $display = false) in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuItemsForm.inc.php on line 19
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuItemsForm::validate() should be compatible with Form::validate($callHooks = true) in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuItemsForm.inc.php on line 19
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuItemsForm::execute() should be compatible with Form::execute() in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuItemsForm.inc.php on line 19
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:36 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of OpenAIREDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/csvtujou/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 0
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuItemsForm::fetch() should be compatible with Form::fetch($request, $template = NULL, $display = false) in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuItemsForm.inc.php on line 19
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuItemsForm::validate() should be compatible with Form::validate($callHooks = true) in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuItemsForm.inc.php on line 19
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of NavigationMenuItemsForm::execute() should be compatible with Form::execute() in /home/csvtujou/public_html/lib/pkp/controllers/grid/navigationMenus/form/NavigationMenuItemsForm.inc.php on line 19
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/csvtujou/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically, assuming $this from incompatible context in /home/csvtujou/public_html/lib/pkp/classes/form/Form.inc.php on line 369
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/csvtujou/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 592
[06-Jan-2018 22:40:43 Asia/Kolkata] PHP Fatal error: Call to a member function getPath() on null in /home/csvtujou/public_html/cache/t_compile/afdbc343a85db3051c96acebe4dc1fed0244d413^%%56^56A^56A06BB9%%navigationMenuItemsForm.tpl.php on line 62


#8

Hi @JyotiKant,

The relevant line of the log is

PHP Fatal error: Call to a member function getPath() on null in /home/csvtujou/public_html/cache/t_compile/afdbc343a85db3051c96acebe4dc1fed0244d413^%%56^56A^56A06BB9%%navigationMenuItemsForm.tpl.php on line 62

I’ll ask the developer who maintains that code to take a look.

Regards,
Alec Smecher
Public Knowledge Project Team


#9

Waiting for Your Response


#10

Hi @JyotiKant.

Could you check if that issue’s [https://github.com/pkp/pkp-lib/issues/3080] fix solves your problem?

The fix is included at the latest OJS version.

Thanks!
@Dimitris_Efstathiou


#11

this problem is not rectified yet. plz do the need full


#12

Thanks @JyotiKant.

Were you able to check if the code changes made https://github.com/pkp/pkp-lib/pull/3081 fixes your issue?

Thanks!


#13

Hello,
I’m also experiencing this problem but at random intervals. Sometimes it seems as if the interface was unresponsive and require more time to process requests and slowing down between clicks is helpful but on others - it’s hard to diagnose.

For example, when editing e-mails. Sometimes the window opens as expected with Tiny MCE editor but sometimes it refuses with an error.


#14

Hi, I got the log error like this
[27-Jul-2018 05:36:33 America/Chicago] PHP Parse error: syntax error, unexpected ‘&’ in /home/sawitsawit/public_html/jurnalkelapasawit/lib/pkp/controllers/modals/editorDecision/form/SendReviewsForm.inc.php on line 78
I’ve got it when to trying “Request Revision”, how I can fix it.


#15

Hi @asmecher,
on OJS3.1.1.2 I get this error when I try uploading a revision file. in the error_log I found this line:

PHP Fatal error: Call to a member function getId() on null in /lib/pkp/classes/security/authorization/internal/ReviewRoundRequiredPolicy.inc.php on line 48

I found that these two objects are returned as NULL in this file, so their member functions are not found:

$submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);

$stageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);

any ideas on why this is happening? this is a new error and was not encountered until a couple days ago. currently I have commented these lines and I hope this does not create any side-effects.

Cheers,


#19

Hello I am facing a similar problem.

Trying to add a new reviewer.

Failed Ajax request or invalid JSON returned.

This is the php log:

[10-Jan-2019 13:55:37 Europe/Berlin] PHP Warning:  assert(): assert(false) failed in C:\xampp\htdocs\CEDEX\lib\pkp\classes\i18n\PKPLocale.inc.php on line 169
[10-Jan-2019 13:55:37 Europe/Berlin] PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in C:\xampp\htdocs\CEDEX\lib\pkp\plugins\generic\usageEvent\PKPUsageEventPlugin.inc.php on line 386
[10-Jan-2019 13:55:38 Europe/Berlin] PHP Warning:  Declaration of ReviewerForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in C:\xampp\htdocs\CEDEX\lib\pkp\controllers\grid\users\reviewer\form\ReviewerForm.inc.php on line 19
[10-Jan-2019 13:55:38 Europe/Berlin] PHP Warning:  Declaration of ReviewerForm::initData($args, $request) should be compatible with Form::initData() in C:\xampp\htdocs\CEDEX\lib\pkp\controllers\grid\users\reviewer\form\ReviewerForm.inc.php on line 19
[10-Jan-2019 13:55:38 Europe/Berlin] PHP Warning:  Declaration of ReviewerForm::execute($args, $request) should be compatible with Form::execute() in C:\xampp\htdocs\CEDEX\lib\pkp\controllers\grid\users\reviewer\form\ReviewerForm.inc.php on line 19
[10-Jan-2019 13:55:38 Europe/Berlin] ojs2: DB Error: FUNCTION cedex_sept.DATE_PART does not exist

On my development server, I have the same error, but with a different database.DATE_PART that doesnt exist.

Any solution?

This issue is from 2016!!