JSON Issues after Installing Plugins

Dear all,
I am running OJS 3.1.2 from a Docker container. When I first installed OJS, everything (file upload, saving metadata etc) worked just well. However, for the second time I came across problems after installing/enabling plugins via the plugin gallery.
After enabling the custom block plugin, I basically got the same error as OJS 3 Submission metadata saving issues - #4 by asmecher
This is my console log:
grafik

What if have done so far:

The first time I got a similar issue was when I installed the QuickSubmit plugin. The only solution at that time was to just purge everything and recreate the container from scratch.

Any help would be appreciated.

Best,
Franzi

Rebuilding the container did not help either. Also, for some reason, the error log is empty.

Hi @fpannach,

For some reason JSON is malformed. Path to the TabHandler.js is: lib/pkp/js/controllers/TabHandler.js

Dear @Vitaliy,
thanks. It seems the code already includes the fix. pkp/pkp-lib#4072 Fix double-parsing of JSON data · asmecher/pkp-lib@65475ba · GitHub

Does your OJS instance have that commit?

I am running 3.1.2, I think the fix was for 3.1.1.4 (?).

Yes, it should be fixed, but I’d double check.

Also, do you see anything relevant regarding requests and responses upon plugin activation, e.g. under network tab of Google Chome browser? Is there something with status code not 200?

Everything has status code 200, but when I checked the plugin activation, I could actually see the list of plugins. However, after activating/deactivating the custom block plugin again, now the plugin list too is a white page.

Maybe to clarify, the plugin actually worked the first time I activated it, but it resulted in AJAX errors when I wanted to do new submissions.

Also, I am using this docker image: GitHub - TypesetIO/pkp-ojs-docker: Docker file complete with docker-compose for setting up a super simple OJS installation

Do you see any Fatal Errors in the logs? If the plugins page doesn’t load, there should be something reflected in PHP logs.

btw thanks for looking into this

No, for some reason, the error log (inside the container /var/log/apache2) is completely empty.

Unfortunately I haven’t got any experience with Docker and its logging to outside the container. Maybe @NateWr knows more.

Also, the docker logs do not show any error messages:

[OJS Startup] Started cron
[OJS Startup] Starting apache… You’ll be good to go after this…
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.23.0.2. Set the ‘ServerName’ directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.23.0.2. Set the ‘ServerName’ directive globally to suppress this message
[Thu May 09 07:07:41.206491 2019] [mpm_prefork:notice] [pid 8]
AH00163:Apache/2.4.25 (Debian) PHP/7.2.17 configured – resuming normal operations
[Thu May 09 07:07:41.206542 2019] [core:notice] [pid 8]
AH00094: Command line: ‘apache2 -D FOREGROUND’

Is this problem reproducible without Docker?

I installed OJS 3.1.2 [without dockerization] on my local machine and it seems to work fine, before and after enabling plugins (Custom Block & DOI)

So, the problem is probably in Docker image :slight_smile: I think it’s better to contact its developer. The only thing that I see is that this script doesn’t compile js:

npm install
npm run build

In your install, does OJS download via pkp.sfu.ca or git?

It’s downloaded from the pkp website

I rebuilt the docker container and installed nodeJS/npm inside the container although the installation should have come with npm already since it was downloaded from pkp.sfu.ca. After reinstalling everything, I have the same issue as before wtith saving the metadata: OJS 3 Submission metadata saving issues - #4 by asmecher

Here some errors from the browser console. PHP errorlog inside the container + Docker logs are still empty.

grafik

Opera just shows a blank screen after sign in, Firefox shows the frame of the submission workflow but the inner sections are blank.

The error says that JSON data here is malformed: https://github.com/pkp/pkp-lib/blob/master/js/controllers/TabHandler.js#L263

Can you look at the output of the jsonString either from the Chome’s Network tab or directly via console: console.log(jsonString); (turn config setting enable_minified to off).

E.g., in my case when changing tabs that represent submissions workflow stage I receive:

content: "the content of response here"
elementId: "0"
events: null
status: true

It probably would be a starting point for debugging - to look what is missing or malformed.