No images in HTML galley of a versioned article

Description of issue or problem I’m having:
We run into a problem with image paths of HTML galleys of different versions of an article. These image paths seems to work only for the first version and afterwards will not include the newer versions in their paths.

Steps I took leading up to the issue:

  1. Create some article and publish the first version with a PDF galley only.
  2. Create another version and upload an additional HTML file with <img src="./image1.png "/> and upload an image named accordingly as a dependent file.
  3. Look at the preview or publish this version.
  4. You will see your HTML galley where the image will not be shown.

What I tried to resolve the issue:
The HTML galley itself has an url like .../article/view/84/version/322/246 where the image path in it points to .../article/download/84/246/586 and if I try instead .../article/download/84/version/322/246/586 the image appears. Hopefully, this can be easy fixed in the code for the rewriting these image paths in an HTML galley.

(As a temporary fix I could replace in the HTML file the image paths with the absolute urls of the images, but this is only a manual hack.)

Application Version - e.g., OJS 3.1.2:
I could replicate the problem with OJS as well as with OJS

Additional information, such as screenshots and error log messages if applicable:
A 404 message in the browser console, when it tries to load the image in the HTML galley.

1 Like

Hi @zuphilip,

Sorry for the late reply and thanks for reporting! I’ve opened an issue: Images aren't handled correctly on the front end of HTML galleys in versioned articles · Issue #7330 · pkp/pkp-lib · GitHub