Image URL of previous version is broken

I just upgraded to OJS 3.2.1.3 .

I use the embedGalley-Plugin to display JATS-XML on the article landing page. Now, when I publish a new version, the image URLs of the previous version (Version 1) causes a 404 error. Although it is the same URL as before (so, when there was only the original version). Only the image URL of the most recent version is resolved successfully.

The other way around, it happens when I only see the preview of a new version on my article landing page. There are no images loaded in the preview of this new version.

Any ideas why this happens?

Cheers,

Adrian

Could it be something like OJS cannot handle the download URL like

https://mybaseurl.com/tester/index.php/journal-name/article/download/53/99/346 for older versions?

Also, I just found that when I click the PDF of Version 1, I get redirected to the landing page of Version 2…

I just had a view in my logs and found this, when I click the link to Version 1:

ojs2: 404 Not Found, referer: https://mybaseurl.com/tester/index.php/journal-name/article/view/53/version/67

Does that me, OJS does not find the whole previous article and instead loads the most recent one?

Especially the help of @asmecher and/or @NateWr would be very appreciated.

Never mind! Found the issue…

I had to generate the URL like this:

$fileUrl = $request->url(null, 'article', 'download', [$referredArticle->getBestArticleId(), 'version', $referredPublication->getId(), $galley->getBestGalleyId(), $embeddableFile->getId()]);

Took me quite some time to see this! Sorry for bothering you!

1 Like