[OJS-3.2] "Undefined constant STATUS_PUBLISHED" error

We’re experimenting with upgrading an OJS-3.1.2 instance to OJS-3.2, with PHP-7.3.15. The database upgrade process seems to have worked fine, and most of the OJS interface is working without problems.

Yet, when listing the table of contents for an issue via “Issues” > “Future Issues” > [issue], nothing is shown, and the spinner keeps spinning:


Yet, the Issues overview is displaying the correct number of articles for each issue (in the “Items” column):


When I’m inspecting the response for the Issue TOC request (https://myjournal/index.php/journal/$$$call$$$/grid/toc/toc-grid/fetch-grid?issueId=5&_=1584364646420 )in the javascript console, I’m seeing this error:

Warning: Use of undefined constant STATUS_PUBLISHED - assumed
  'STATUS_PUBLISHED' (this will throw an Error in a future version 
  of PHP) in /var/www/html/classes/services/SubmissionService.inc.php on line 156

What could be the cause of this message? A PHP error (we’re running 7.3.15), or OJS upgrade error? I first suspected a quirk in the OJS upgrade process, where some labels for the publication status of existing articles in the database weren’t updated correctly. However, the same error is thrown when creating a new issue in OJS-3.2 and scheduling a newly created article for that issue.

Has anyone else encountered this “Undefined constant STATUS_PUBLISHED” error or know how to remedy it?

Many thanks,


1 Like

Hi @rvdb,

You can resolve this by making this change:

However, the reason this is breaking your UI is that you have your PHP error log directed to the browser. It’s recommended not to do this – check your PHP configuration and direct your log to the log file instead.

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thanks for your quick help. At short notice, I could indeed ‘fix’ the UI by setting debug_errors to “Off” in config.inc.php : the issue TOC is shown, although it is empty. Thanks for the hint about PHP logging; I’ll take this up with my colleague, who’s more proficient in Docker (we’re setting up an OJS Docker image), so we can get the debug output logged properly.

Yet, adding that line to classes/services/SubmissionService.inc.php does not seem to have any effect; the TOC is still showing up empty:


That is: the sections to which the scheduled articles belong do show up correctly, but the articles themselves aren’t listed. Is there something else that should be done?

Hi @rvdb,

Good, this is definitely progress. The empty table of contents is also described here: OJS 3.2.0 Table of contents on numbers - #5 by adem (as opposed to a broken load of that part of the page, which we’ve now resolved)

Let’s continue trying to debut that over on the other thread.

Alec Smecher
Public Knowledge Project Team