Published is always shows today’s date. Updated on always shows yesterday date for article. (OMP 3.4.0.9)

OMP 3.4.0.9

Server Information
OS platform Linux
PHP version 8.2.30
Apache version Apache
Database driver mysql
Database server version 10.5.29-MariaDB

I’m working with OMP 3.4.0.9 x and I’m seeing behavior around publication dates that I don’t fully understand.

On the frontend, there is one article are displayed as:

image

January 12, 2026 — Updated on January 11, 2023

Published is always today’s date. Updated on is always shows yesterday date. The book was not updated (recently at least).

This comes from the following template logic (simplified):

{if $firstPublication->getID() === $publication->getId()}
  {$firstPublication->getData('datePublished')|date_format}
{else}
  {translate key="submission.updatedOn"
    datePublished=$firstPublication->getData('datePublished')|date_format
    dateUpdated=$publication->getData('datePublished')|date_format}
{/if}

For this publications :$firstPublication and $publication have different IDs

Looking at API submission

This is the data

“publications”: [
{
“_href”: “http://localhost:8080/index.php/home/api/v1/submissions/202/publications/212”,
“datePublished”: null,
“doiObject”: null,
“id”: 212,
“status”: 1,
“submissionId”: 202,
“urlPublished”: “http://localhost:8080/index.php/home/catalog/book/202/version/212”,
“version”: 1
},
{
“_href”: “http://localhost:8080/index.php/home/api/v1/submissions/202/publications/213”,
“datePublished”: “2021-01-12”,
“doiObject”: null,
“id”: 213,
“status”: 1,
“submissionId”: 202,
“urlPublished”: “http://localhost:8080/index.php/home/catalog/book/202/version/213”,
“version”: 2
},
{
“_href”: “http://localhost:8080/index.php/home/api/v1/submissions/202/publications/214”,
“datePublished”: “2021-01-12”,
“doiObject”: {
“contextId”: 1,
“doi”: “10.5074/T.2021.001”,
“id”: 148,
“registrationAgency”: null,
“resolvingUrl”: “https://doi.org/10.5074/T.2021.001”,
“status”: 1
},
“id”: 214,
“status”: 1,
“submissionId”: 202,
“urlPublished”: “http://localhost:8080/index.php/home/catalog/book/202/version/214”,
“version”: 3
},
{
“_href”: “http://localhost:8080/index.php/home/api/v1/submissions/202/publications/215”,
“datePublished”: “2023-01-11”,
“doiObject”: {
“contextId”: 1,
“doi”: “10.10.abc/12345”,
“id”: 149,
“registrationAgency”: null,
“resolvingUrl”: “https://doi.org/10.abc/12345”,
“status”: 5
},
“id”: 215,
“status”: 3,
“submissionId”: 202,
“urlPublished”: “http://localhost:8080/index.php/home/catalog/book/202/version/215”,
“version”: 4
}
],

Any idea of why this is happening and how to fix it?

Hi @gkuhn, does the publication have multiple versions in OMP? If so, check the publication dates (Date Published in the Catalog Entry section), as there could be an issue in one of those versions.

Assuming you are looking at the latest version of the publication, then the first date would be the publication date of the first published version of the publication, and the “updated” date will be the publication date for the last version of the publication.

Hi Kaitlin. There are 4 versions of this publication:

Version 1 => “datePublished”: null

Version 2 and 3 => “datePublished”: “2021-01-12”

Version 4 => “datePublished”: “2023-01-11”

The correct “datePublished” is “2021-01-12”

Is there a way to fix it from the admin panel?

Hi @gkuhn, you can fix them by either:

  • Going into the publication in the OMP interface and fixing each version’s publication date in the “Catalog Entry” section, or
  • Editing the date_published for each publication in the publications table in your database (they will all have the same submission_id), making sure to take a backup before editing the database directly. You should also update the null date on version 1.
1 Like