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

Hi Juan López,

Check if you have the following lines in “On” in your config.inc.php file

show_stacktrace = On
display_errors = On

If so, set them to Off, and then test if it works

Regards

@juanf.csic That seems to make it work! thank you very much for your support!!

Hi
In my case the error is presented when I try to add a colaborator
1
I need to solve asap to publish an issue of my journal.

Thanks

Hi @Alexis_Otero,

Check your PHP error log for details.

Regards,
Alec Smecher
Public Knowledge Project Team

I think this is the problem:
[22-Jul-2020 03:43:17 UTC] PHP Fatal error: Uncaught Error: Call to undefined function bindtextdomain() in /home/cicgauan/public_html/revista/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php:87
Stack trace:
#0 /home/cicgauan/public_html/revista/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php(46): Sokil\IsoCodes\AbstractDatabase->bindGettextDomain()
#1 /home/cicgauan/public_html/revista/lib/pkp/lib/vendor/sokil/php-isocodes/src/IsoCodesFactory.php(65): Sokil\IsoCodes\AbstractDatabase->__construct(NULL)
#2 /home/cicgauan/public_html/revista/lib/pkp/controllers/grid/users/author/form/PKPAuthorForm.inc.php(134): Sokil\IsoCodes\IsoCodesFactory->getCountries()
#3 /home/cicgauan/public_html/revista/lib/pkp/controllers/grid/users/author/AuthorGridHandler.inc.php(309): PKPAuthorForm->fetch(Object(Request))
#4 /home/cicgauan/public_html/revista/lib/pkp/controllers/grid/users/author/AuthorGridHandler.inc.php(287): AuthorGridHandler->editAuthor(Array, Object(Request))
#5 /home/cicgauan/public_html/revista/lib/pkp/classes/core/PKPRouter in /home/cicgauan/public_html/revista/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php on line 87

See this mainly
#4 /home/cicgauan/public_html/revista/lib/pkp/controllers/grid/users/author/AuthorGridHandler.inc.php(287): AuthorGridHandler->editAuthor(Array, Object(Request))

I hope you can help me
Thanks
Alexis

Hi @Alexis_Otero,

See e.g.: The 500 error in registration page

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

I have some comments for you about my problem.
The previous version I had installed is 3.1.2-4, in this version everything works fine, at this moment we check this version with an old database and everything is OK, when I update to 3.2.0-3 and then to 3.2.1-1, the problem to add collaborators appears. We check this two version now. Then, there will be another problem?
I have not yet been able to install the php module that tells me in the previous link, our system is hosted on a hosting service (cpanel) and we have not been able to install the module. However, don’t you think that the cause is different?
Than you for your help
Alexis

Hi @Alexis_Otero,

This is definitely caused by missing gettext support in your PHP environment. That’s a new requirement starting with OJS/OMP/OPS 3.2.0.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher
Thank you for your help.
To install gettext module vía cpanel we need the help of the admin hosting or we can do ? We check and don’t found this module.

Hi @Alexis_Otero,

This will depend on your host – but I suspect it’ll be something like this: https://manage.accuwebhosting.com/knowledgebase/2331/How-to-EnableorDisable-PHP-Extensions-From-cPanel.html

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

image

Hi, In my case the problem is showed when I try to edit the user.
I have installed the gettext module.
Any suggestion?
Thanks in advance.

Hi @mauritroviano,

Have you checked your PHP error log?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher thanks for your anwser.
Here I paste the error log

PHP Warning: Module ‘curl’ already loaded in Unknown on line 0
PHP Warning: Module ‘exif’ already loaded in Unknown on line 0
[Mon Aug 03 06:25:01.755360 2020] [mpm_prefork:notice] [pid 1266] AH00163: Apache/2.4.43 (Ubuntu) OpenSSL/1.1.1g configured – resuming normal operations
[Mon Aug 03 06:25:01.755368 2020] [core:notice] [pid 1266] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Aug 03 10:14:19.457781 2020] [mpm_prefork:notice] [pid 1266] AH00173: SIGHUP received. Attempting to restart
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to supp$
PHP Warning: Module ‘curl’ already loaded in Unknown on line 0
PHP Warning: Module ‘exif’ already loaded in Unknown on line 0
PHP Warning: Module ‘gettext’ already loaded in Unknown on line 0
[Mon Aug 03 10:14:19.488010 2020] [mpm_prefork:notice] [pid 1266] AH00163: Apache/2.4.43 (Ubuntu) OpenSSL/1.1.1g configured – resuming normal operations
[Mon Aug 03 10:14:19.488041 2020] [core:notice] [pid 1266] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Aug 03 10:16:48.879084 2020] [mpm_prefork:notice] [pid 1266] AH00173: SIGHUP received. Attempting to restart
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to supp$
PHP Warning: Module ‘curl’ already loaded in Unknown on line 0
PHP Warning: Module ‘exif’ already loaded in Unknown on line 0
PHP Warning: Module ‘gettext’ already loaded in Unknown on line 0
[Mon Aug 03 10:16:48.901369 2020] [mpm_prefork:notice] [pid 1266] AH00163: Apache/2.4.43 (Ubuntu) OpenSSL/1.1.1g configured – resuming normal operations
[Mon Aug 03 10:16:48.901397 2020] [core:notice] [pid 1266] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Aug 03 10:21:42.753571 2020] [mpm_prefork:notice] [pid 1266] AH00171: Graceful restart requested, doing restart
PHP Warning: Module ‘curl’ already loaded in Unknown on line 0
PHP Warning: Module ‘exif’ already loaded in Unknown on line 0
PHP Warning: Module ‘gettext’ already loaded in Unknown on line 0
[Mon Aug 03 10:21:42.807053 2020] [mpm_prefork:notice] [pid 1266] AH00163: Apache/2.4.43 (Ubuntu) OpenSSL/1.1.1g configured – resuming normal operations
[Mon Aug 03 10:21:42.807064 2020] [core:notice] [pid 1266] AH00094: Command line: ‘/usr/sbin/apache2’
[Mon Aug 03 10:21:47.591519 2020] [mpm_prefork:notice] [pid 1266] AH00173: SIGHUP received. Attempting to restart
PHP Warning: Module ‘curl’ already loaded in Unknown on line 0
PHP Warning: Module ‘exif’ already loaded in Unknown on line 0
PHP Warning: Module ‘gettext’ already loaded in Unknown on line 0
[Mon Aug 03 10:21:47.616150 2020] [mpm_prefork:notice] [pid 1266] AH00163: Apache/2.4.43 (Ubuntu) OpenSSL/1.1.1g configured – resuming normal operations
[Mon Aug 03 10:21:47.616182 2020] [core:notice] [pid 1266] AH00094: Command line: ‘/usr/sbin/apache2’

Hi @mauritroviano,

Does anything new appear when you try to access the problem part of the installation?

Regards,
Alec Smecher
Public Knowledge Project Team

The installation went smoothly. But I detected that when a new user is added, after pressing “accept” the system stays processing and does not return any messages. Step “2” cannot be accessed to assign roles to users. Any ideas?
Thanks in advance

Hi @mauritroviano,

Does anything new appear in the PHP error log when you try to access that part of the system?

Regards,
Alec Smecher
Public Knowledge Project Team

No, nothing strange appears, I just tried to add gd2 but I don’t know if it’s necessary.

[Tue Aug 04 10:45:00.221628 2020] [mpm_prefork:notice] [pid 1266] AH00173: SIGHUP received. Attempting to restart
PHP Warning: PHP Startup: Unable to load dynamic library ‘gd2’ (tried: /usr/lib/php/20190902/gd2 (/usr/lib/php/20190902/gd2: cannot open shared object f$
[Tue Aug 04 10:45:00.245742 2020] [mpm_prefork:notice] [pid 1266] AH00163: Apache/2.4.43 (Ubuntu) OpenSSL/1.1.1g configured – resuming normal operations
[Tue Aug 04 10:45:00.245785 2020] [core:notice] [pid 1266] AH00094: Command line: ‘/usr/sbin/apache2’

Hi @mauritroviano,

Sorry if I’m asking questions repetitively, I just wanted to be sure :slight_smile:

The next thing to check out is the JSON response that your browser is having trouble parsing. You can use your browser’s developer tools to do this – let me know if you need more guidance.

Regards,
Alec Smecher
Public Knowledge Project Team

I don’t know these kind of things but when I select “user edit” this part of code is selected.

Editar usuario/a

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