Failed Ajax request or invalid JSON returned on issue publishing

Hello everyone,
I am a new user, running OJS version 3.2.0 for the journal I am working with.
I asked my developer, the one who installed OJS on our server to change the file size limit, so that I could upload files larger than 1 mb to create issue galleys. After he did it I can’t publish my future issues. It shows me this type of error message:
journal…says:
Failed Ajax request or invalid JSON returned.

I asked the developer again to search the code and try to fix this issue. The code shows just a 500 internal server error . and there is no error at apache2 error logs as well. We are stuck with this issue and we don’t know how to fix it.
I would really appreciate your help

I hope the following pictures may illustrate my problem better:

This is some info regarding the version…

Hi @hb07,

OJS 3.2.0 hasn’t been released yet – you’re probably running some version of pre-release code downloaded from github directly. I’d recommend either installing from the latest git stable branch (currently ojs-stable-3_1_1), or using the .tar.gz package. The current master branch is not stable at the moment, so you’ll run into lots of problems like this.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thank you very much for your reply.

Yes, I have the latest version directly from github. Can I just checkout the latest released branch you provided. Would this affect the current issues/articles I have added in my journal? If it is just a git checkout, I can do it directly, but I wanted to be sure that this won’t affect my website…

Regards,
Hysni

Hello again, @asmecher

I checked out the stable release version that you told me (OJS 3.1.1), on the same directory in my server, than I tried to build it : “npm run build” and it was successful. Afterwards I tried to start the php on port 8000, like I did with the previous version (OJS 3.2.0). The php starts without errors but I can not browse it, and neither can I check the php background with curl. So, basically I checked out the code and did everything like the previous time bur I cant see my application running. I did restarts of the server and web-server (Apache 2) many times, but it still didn’t work.

I hope you can help me fix this issue.
Best regards,
Hysni Bendo

Hi @hb07,

Any error messages? Can you describe what happens when you try to use the system? Note that the databases aren’t totally compatible – you won’t be able to use the 3.2 database with the 3.1.1 code version without some trouble.

Regards,
Alec Smecher
Public Knowledge Project Team

I will try to reinstall the database from the beginning into a new server directory.
Thank you so much for your reply :slight_smile:

Best regards,
Hysni Bendo

Hello everyone,

I have the same error while I am trying to “Add new User”. I have installed OJS 3.2.0, everything works fine except this while new user creation. Please help I am stuck with this issue.



Here is the error log file what is shows.

[25-Mar-2020 05:36:45 UTC] PHP Fatal error: Uncaught Error: Call to undefined function bindtextdomain() in /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php:87
Stack trace:
#0 /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php(46): Sokil\IsoCodes\AbstractDatabase->bindGettextDomain()
#1 /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/lib/vendor/sokil/php-isocodes/src/IsoCodesFactory.php(65): Sokil\IsoCodes\AbstractDatabase->__construct(NULL)
#2 /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/controllers/grid/settings/user/form/UserDetailsForm.inc.php(159): Sokil\IsoCodes\IsoCodesFactory->getCountries()
#3 /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/controllers/grid/settings/user/UserGridHandler.inc.php(287): UserDetailsForm->display(Object(Request))
#4 /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/controllers/grid/settings/user/UserGridHandler.inc.php(264): UserGridHandler->editUser(Array, Object(Request))
#5 /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/classes in /home/wumkpdcedu/ojs.wumardan.edu.pk/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php on line 87

Hi @pjhssr,

See Failed Ajax request or invalid JSON returned while adding new user "Add User". Please don’t post the same content in multiple places – it clutters the forum.

Regards,
Alec Smecher
Public Knowledge Project Team

To my experience, such errors usually go away after a browser’s cache cleanup.

Hey @asmecher,

Still my question not answered and I am still stuck with the issue. Don’t know where is the problem if you please have a look and let me know to fix the issue please.

Best Regards
PJHSSR

Hey @mgscano,

I tried it another browser and clear the cache but still not working. Please let me know if you can help me.

Hi @pjhssr,

Did you try the solution at the thread I linked to above?

Regards,
Alec Smecher
Public Knowledge Project Team

Yup I checked and tried but still not succeed… Look at the PHP version and MySQL that I have installed.

Locking this thread to avoid duplicates; the conversation will continue here: Failed Ajax request or invalid JSON returned while adding new user "Add User"