Entries in Editorial History showing {$submissionId} tag instead of actual submission ID

Hi there!

All my entries in Editorial History are showing the {$submissionId} tag instead of the actual submission ID:

image

How can I fix this?

I’m using OJS 3.1.2.0.

Thanks in advance!

Hi @alexxxmendonca,

What version of OJS were these log entries created under? I suspect you have outdated data in your database; the articleId event log variable should have been renamed to submissionId as part of the OJS 3.1.0 upgrade. From dbscripts/xml/upgrade/3.1.0_update.xml:

UPDATE event_log_settings SET setting_name='submissionId' WHERE setting_name='articleId';

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

They were definitely not created under OJS 3.x

They were created under OJS 2.x. Not sure if we can tell you which version specifically.

Hi all,

I found a typo in the upgrade script that was supposed to populate the {$submissionId} variable in OJS 2.x to 3.x upgrades. You can fix it by running the above SQL query after upgrading. This will be fixed in OJS 3.1.2-1 and newer.

https://github.com/pkp/pkp-lib/issues/4726

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I’m having this same problem after upgrading from 2.4.8.0 to 3.1.2.1. I’ve checked the database and it looks like the upgrade script did change articleId to submissionId. Anything else that would cause this problem?

Hi @njn315,

Have you tried the query linked above? If I remember correctly, the issue is that some cases of articleId were not converted to submissionId. The query should resolve it.

Regards,
Alec Smecher
Public Knowledge Project Team

I ran this query first to see if there were any instances of articleID,

SELECT * FROM ojs.event_log_settings where setting_name=‘articleID’;

but it returned 0 results.

I just now ran the above update query and it came back as affecting 0 rows.

Hi @njn315,

Watch the capitals – that should be articleId, not articleID.

Regards,
Alec Smecher
Public Knowledge Project Team

Ah, thanks. I just re-ran as articleId, and no results.

SELECT * FROM ojs.event_log_settings where setting_name=‘articleId’;

Running SELECT * FROM ojs.event_log_settings where setting_name=‘submissionId’; returned 582 results. So it looks like the upgrade script correctly renamed these.

Hi @njn315,

I suspect that the submissionId variable is straight up missing from the log entry you’re looking at. See if you can pick the log ID out of the URL by looking at any actions associated with the log entry; alternately, let me know what kind of log entry it is and I’ll see if I can narrow it down with a query.

Regards,
Alec Smecher
Public Knowledge Project Team

You’re right. And actually looking back at our OJS 2 instance, the same submission had the same problem. I assumed it was an issue with the upgrade. Here’s another example of a submission where the submissionId is missing in the 1st and 3rd line, but has the submissionId in the 2nd line. What causes the submissionId variable to be present in some log entries but not others?ojs3

Hi @njn315,

I would suspect that this is a vaguery of the OJS 2.x code, possibly a few versions back if you’ve upgraded several times, that no longer applies to OJS 3.x. If you’re able to replicate this behavior with a new submission, then let’s try to track it down, but otherwise I’d suggest treating it as a legacy nuisance. It’s clear what submission ID you’re working with by context.

If you really need a work-around, you can add new entries to the event_log_settings table to fill in the missing submissionId entries.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher, Thanks for the reply. It appears history for new submissions in the OJS 3 instance are working properly. I don’t see any appearances of {$submissionId} in the history of new submissions, only in the submissions that were started in OJS 2. Thanks for your help.