OJS 3.2.1-1 error: Failed Ajax request or invalid JSON returned

Hi @mauritroviano,

Here’s a general guide on using the browser’s developer tools to inspect a response using Google Chrome:

Other browsers will be similar.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok, This is the header when I try to edit the user… Is it usefull? or you need the response information?

  1. Request URL:

https://avermaexa.unsa.edu.ar/index.php/averma/$$$call$$$/grid/settings/user/user-grid/edit-user?gridId=grid-settings-user-usergrid&rowId=1&grid-settings-user-usergridPage=1&grid-settings-user-usergridItemsPerPage=25&oldUserId=0&_=1596632305113

  1. Request Method:

GET

  1. Status Code:

200 OK

  1. Remote Address:

170.210.201.166:443

  1. Referrer Policy:

no-referrer-when-downgrade

  1. Response Headersview source

  2. Cache-Control:

max-age=10

  1. Connection:

Keep-Alive

  1. Content-Type:

application/json

  1. Date:

Wed, 05 Aug 2020 12:59:03 GMT

  1. Expires:

Wed, 05 Aug 2020 12:59:13 GMT

  1. Keep-Alive:

timeout=5, max=100

  1. Server:

Apache/2.4.43 (Ubuntu)

  1. Set-Cookie:

OJSSID=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/

  1. Set-Cookie:

OJSSID=o2d5jr9g71roi3319kme9ujn49; expires=Fri, 04-Sep-2020 12:59:03 GMT; Max-Age=2592000; path=/; domain=avermaexa.unsa.edu.ar

  1. Transfer-Encoding:

chunked

  1. Request Headersview source

  2. Accept:

application/json, text/javascript, /; q=0.01

  1. Accept-Encoding:

gzip, deflate, br

  1. Accept-Language:

es-US,es-419;q=0.9,es;q=0.8,en;q=0.7

  1. Connection:

keep-alive

  1. Cookie:

OJSSID=o2d5jr9g71roi3319kme9ujn49

  1. Host:

avermaexa.unsa.edu.ar

  1. Referer:

https://avermaexa.unsa.edu.ar/index.php/index/admin/contexts

  1. User-Agent:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

  1. X-Requested-With:

XMLHttpRequest

  1. Query String Parametersview sourceview URL encoded

  2. gridId:

grid-settings-user-usergrid

  1. rowId:

1

  1. grid-settings-user-usergridPage:

1

  1. grid-settings-user-usergridItemsPerPage:

25

  1. oldUserId:

0

  1. _:

1596632305113

Hi @mauritroviano,

You’ll need to look in the response for something that’s not valid JSON. The best way to do that is probably to inspect the response manually, looking for something unusual, and if you can’t see something there, use a JSON linter/formatter, e.g. https://jsonlint.com/.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok… I can’t solve the problem… but I changed the php version from 7.4 to 7.2 and also re create the database. After that I have to reinstall ojs and all was ok this time.
Thanks @asmecher for your help.
Regards,
PD: I’m using ubuntu server 18.04 in a fresh installation

1 Like

Where can I find the list with requirements for OJS and OMP (both 3.2.0-3)

Hi @ugp2,

For system requirements, see docs/README.md in the OJS installation directory.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thank you for the response.

What I meant is: where is the list of required modules? In the topic you mentioned ‘gettext’. In the README.md is this not mentioned. We also ran into the fact that mysqli and php-xml were not installed. This makes me wonder if there might be a list in which all these things are mentioned.

Regards,
Pia Spriensma,
UGP

Hi @ugp2,

We don’t formally maintain a list – different distributions of PHP will have various of them built in, so it’s tough to make a meaningful list. But this tool can apparently tell you which are needed: PHP CompatInfo

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Here you have list I build with compatinfo a year ago or so (for 3.2.0-1)… that is quite a long time, but I didn’t noticed more requirements:

Core OJS 3.2.0-1 Require (compatinfo) php:7.2-alpine
Core 7.0.2 Core
apc 3.1.1
apcu 4.0.0
bcmath 4.0.0
bz2 4.0.4
ctype 4.0.4 ctype
curl 5.5.0 curl
date 5.5.0 date
dom 5.0.0 dom
domxml
exif 4.3.0 exif
fileinfo 1.0.5-dev fileinfo
filter 0.11.0 filter
gd 4.0.6 gd
geoip 1.1.0 geoip
gettext 4.2.0 gettext
gmp 4.0.4 gmp
hash 5.6.0beta1 hash
iconv 5.0.0 iconv
igbinary 1.1.1 igbinary
imap 4.0.0 imap
intl 2.0.0b1 intl
json 5.5.0 json
ldap 4.0.4 ldap
libxml 5.2.12 libxml
mbstring 4.2.0 mbstring
mcrypt 4.0.2 mcrypt
memcache 0.2 memcache
memcached 0.1.0 memcached
mssql 4.2.0 mssql
mysql 5.2.3 mysql
mysqli 5.3.0 mysqli
odbc 4.3.0 odbc
openssl 4.0.6 openssl
pcre 4.3.0 pcre
PDO 5.1.0 PDO
pgsql 5.1.0 pgsql
posix 4.0.0 posix
Reflection 5.0.0 Reflection
session 7.0.0 session
shmop 4.0.4 shmop
SimpleXML 5.0.1 SimpleXML
sockets sockets
spl 5.4.0 spl
sqlite 2.0-dev sqlite
sqlite3 5.3.0 sqlite3
standard 7.0.2 standard
tidy 0.5.2 tidy
tokenizer 4.2.0 tokenizer
uri_template uri_template
XCache 2.0.0 XCache
xml 4.0.0 xml
xmlrpc 4.1.0 xmlrpc
xmlwriter 5.1.2 xmlwriter
xsl 5.0.0 xsl
Zend OPcache 7.0.2 Zend OPcache
zip 1.6.0 zip
zlib 4.0.4 zlib

Just to keep the track, would be nice to include the output of tools like this on every release:
http://bartlett.laurent-laville.org/php-compatinfo/

You can also keep the track in the Dockerfiles:

Cheers,
m.

1 Like

Hi @asmecher,

For PKP PN Plugin I received in error.log:

[20-Nov-2020 16:50:29 Europe/Belgrade] PHP Fatal error: Uncaught Exception: DB Error: Table ‘ijcadsee_ojs853.pln_deposits’ doesn’t exist Query: SELECT *
FROM pln_deposits
WHERE journal_id = ?
ORDER BY deposit_id in /home/ijcadsee/public_html/lib/pkp/classes/db/DAO.inc.php:703
Stack trace:
#0 /home/ijcadsee/public_html/lib/pkp/classes/db/DAO.inc.php(197): DAO->handleError(Object(ADODB_mysqli), ‘SELECT *\n\t\t\tFRO…’)
#1 /home/ijcadsee/public_html/plugins/generic/pln/classes/DepositDAO.inc.php(182): DAO->retrieveRange(‘SELECT *\n\t\t\tFRO…’, Array, Object(DBResultRange))
#2 /home/ijcadsee/public_html/plugins/generic/pln/classes/form/PLNStatusForm.inc.php(54): DepositDAO->getByJournalId(1, Object(DBResultRange))
#3 /home/ijcadsee/public_html/plugins/generic/pln/PLNPlugin.inc.php(366): PLNStatusForm->fetch(Object(Request))
#4 /home/ijcadsee/public_html/lib/pkp/classes/controllers/grid/plugins/PluginGridHandler.inc.php(234): PLNPlugin->manage(Array, Object(Request))
#5 /home/ijcadsee/public_html/lib/pkp/classes/core/PKPRouter.inc.php(391): PluginGridHandle in /home/ijcadsee/public_html/lib/pkp/classes/db/DAO.inc.php on line 703

Function in config.ini.php
show_stacktrace = Off
display_errors = Off

I use OJS 3.2.1.2. In previous version of OJS is the same. PLN Plugin doesn`t work.

Any idea?

Regards,
Lazar

Hi @Lazar_Stosic,

I think that’s a different issue than those discussed on this thread; can you post it as a new topic?

Regards,
Alec Smecher
Public Knowledge Project Team

I got the same problem. Just had to change the PHP version from 7.4 to 7.3 and got fixed. Could create and modify users without issues.

1 Like

My version: 3.3.0.7.

I had a similar problem. I solved it.

I opened administrator panel and:

  • clear Data Cache
  • clear Template Cache

In my case I watched cache mixed working ojs url with previous ojs url test version. Once cleared all goes on.

Best regards!

2 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.