Blank page after user login - OJS 3.4.0.5

Hi everyone,

After upgrading an OJS installation from 33013 to 3405 version everything seems to be ok, but a specific user has reported a blank page after make login on OJS. No php error log was registered.

Console error shows the following:

Uncaught SyntaxError: Unexpected token '<' (at submissions:216:36)
	<script type="text/javascript">
		pkp.registry.init('app', "Page", <br />
<b>Deprecated</b>:  json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in <b>/[OJS-PATH]/lib/pkp/classes/db/DAO.php</b> on line <b>333</b><br />
<br />
<b>Deprecated</b>:  unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in <b>/[OJS-PATH]/lib/pkp/classes/db/DAO.php</b> on line <b>338</b><br />
<br />
<b>Deprecated</b>:  json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in <b>/[OJS-PATH]/lib/pkp/classes/db/DAO.php</b> on line <b>333</b><br />
<br />
<b>Deprecated</b>:  unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in <b>/[OJS-PATH]/lib/pkp/classes/db/DAO.php</b> on line <b>338</b><br />

Line 216 = pkp.registry.init('app', "Page", <br />

Environment uses php8.2 and Nginx server.

I don’t know if error is caused from a data related to this user on database or from OJS code, despite this error doesn’t happen with other users.

I have no idea where to search for the error origin.

Any ideas?

Hi @geniusdesign,

It looks like your PHP is configured to have errors/warnings sent to the browser, where they interfere with Javascript. I’d suggest configuring PHP to send errors/warnings to the log file; this is recommended anyway (for security reasons, for example – errors and warnings can reveal server details).

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher

It was exactly it, display_erros was enabled on config.inc.php

Best regards

1 Like