Post 2.4->3.2 upgrade issues (Failed Ajax request or invalid JSON returned)

We have never been this close to getting our system upgraded before. It seems all content made it through. The command line script said upgrade was successful. But … there seems to be some issues with the installation.
phpinfo in my browser says I am running 7.4.11.

I get the “Unexpected error try again” message which I have to x out three times before the dashboard comes up.

Trying to save any settings in journal settings for instance brings up a message saying “the requested URL was not recognized”. Which URL is it referring to? Is this a config setting that has still got the production server’s base URL?

2.4.x had Norwegian as the default locale. This came up as a blank locale in 3.2. Added Norwegian and deleted the blank one. Set Norwegian to default. Trying to edit an issue galley, renaming the label, I get a message telling me it needs a locale. English is selected in the drop down menu, but Norwegian is not an option.

If I go to statistics->articles I get a graph with the unexpected error overlay which I can just x out, but article details below the graph will not load, and switching to files in the top left brings up the “spinning wheel of death” with nothing loading.

Trying to add an issue tells me my user does not have the rights to do this. Trying to edit my user I get the message “Failed Ajax request or invalid JSON returned.”

There is probably more, but maybe I should try to fix one issue at a time.

Hoping for some help here :slight_smile:

Best regards
Geir Rosset

Hi @geirrosset
All symptoms point that you have removed the journal prefix / path beside index.php from URL structure, am I right?
If so, you may refer to previous descussions about this topic.
For ex;


Thanks drugurkocak, but that didn’t help in my case.

What did make a difference was moving the base_dir to a different server, allowing me to change disable_path_info back to Off.

Now most of the errors are gone, but I still get the “Failed Ajax request or invalid JSON returned” error when trying to edit a user. I am logged in as (site) admin, which on our 2.4.x site lets us access all stages of production (we solely publish back issues which means we submit and approve articles that are already in print). Now I am told in 3.2.x that my user does not have the necessary rights.

I am also unable to add contributors (I am trying to publish a test article using quicksubmit) or add Galleys.

Any help with this last error?

@geirrosset can I confirm that the only problem you’re having now is with the QuickSubmit plugin? Can you confirm the version of OJS you’re running and the version of the QuickSubmit plugin?

Hi NateWr

Nope. The problem is primarily with users. I cannot edit a user or add a user (contributor), I just noticed it after trying to add an article through quicksubmit. If I go to Users->Edit user or Add contributor in quicksubmit I get the “Failed Ajax request or invalid JSON returned” message. OJS

No suggestions as to what is causing this error?

I have seen other threads on this error, but they seem to end before a solution is found.

I have uncommented and hopefully activated gettext in php.ini, but phpinfo() tells me nothing except the author of the module. Still does not work. Running php 7.4.11 on my webhost folder.

Hi @geirrosset,

Are you using mod_rewrite to simplify URLs (e.g. to remove the index.php or obscure the journal path for a single-journal installation)?

Alec Smecher
Public Knowledge Project Team

Just figured it out. Changed the webhost folder php version to 7.3.x and it seems to be working now. Kind of weird as I thought I had already tried that.

Edit: Never mind. Thought I fixed it, but that was only partially. When trying to edit old submissions to fix spelling mistakes and missing characters I still get errors. Trying to add a Contributor it tells me I need to supply a Given name, even though I have, and trying to edit a chapter submission I get to the point where I upload a file to the production stage (because the system thinks there isn’t one, even though I can view and download it from the website), but it shows up with the file name ##common.file.namingPattern##. Editing that name does not work, as it will not save. After this I get an error telling me it needs a file name. So I am stuck.

And to answer your question, no I wasn’t using mod_rewrite. So the issue remains with php 7.4.x. I’ll try to add the first article to the future issue to make sure

I’ll try to explain what the current problem is a bit better.

After upgrading all content seems to be in place. Back issues are available. The issues’ submissions are listed correctly. But there are spelling mistakes and missing characters in some old article metadata fields.

I am logged in as administrator. I have given my user all roles.

I can add issues. I can add submissions to that new issue using quicksubmit and add contributors and galleys.

Looking at one specific submission for a 2008 issue I notice that there are characters missing in the Abstract and Author name (probably encoding mistakes from way back). Submission 111.

I unpublish the submission to fix the mistakes.

I fix the broken/missing characters in metadata. Trying to save it tells me “The form was not saved because 1 error(s) were encountered. Please correct these errors and try again.”

I click “Jump to error” next to “Please correct one error”. It stays on the metadata page, and there are no apparent errors, so there is nothing to fix. The text fields are half width as if there should be a second language there, but I have disable Norwegian leaving only English for now.

The contributor was wrong so I removed that entry to add the correct one, after filling out all fields OJS tells me “A given name is required. ()*”. I have supplied a name so that means the only thing I can do is cancel.

Now I cannot re-publish the submission.

I have moved this to a new thread as it is no longer the same issue as the original post.

1 Like