After migrating from version 2.4 to 3.2.0 in some publications, the images using the lens.js plugin do not show the images.
When reviewing the code I found that it generates the url of the image but when copying the URI it shows me a 404 error.
What is the path where you upload the files? because the file is in files / journals /… / submission / proof
Hi @jpmaidana,
Cannot reproduce this on a clean 3.2.0 instance. Can you specify the version of the plugin?
The path looks correct at first glance, it’s article page and download operation. The first number should be a submission id, second - galley id and the last - file id. Checkout ArticleHandler::download for more details.
You are right, the actual path is inside the proof folder. It should be somewhere in: journals/1/articles/168/submission/proof with a prefix like: 168-10-683... where 1 after journals is the journal id and 168 after articles the submission id.
Checking well I found that it generates the image url and the xml well but it doesn’t show when to start the xml view.
Clarification: Those not found were from a previous publication
The first part of concatenated string is a path to the submission folder, e.g.: /path/to/files/journals/{journalId}/articles/{submissionId}/submission.
The second part if a file stage: take a look at constants defined in SubmissionFile class.
That looks like a different problem from discussed above. Can you confirm that image file with the original filename 81961489005_gf3.png is attached to the XML?
If so, can you look at the submission_files table and find the file by original_file_name and assoc_id columns? The latter is the file_id of the XML file the image is attached to. E.g.:
SELECT * FROM submission_files WHERE original_file_name = '81961489005_gf3.png' AND assoc_id = 'the ID of the XML file'. Let me know if you need help finding this ID.
I’d check if the file is in the database and its file_stage (should be 17)
Returning to the original problem where images are not shown in some publications.
I found that if I add a table in the XML file the images are displayed but not when only the “fig” tags are added to the file.
For example:
<p>
<fig id="gf2" position="anchor" fig-type="plate" orientation="landscape">
<label>Figura 2</label>
<caption>
<title>Diferencias entre la prevención de riesgos penales y laborales</title>
</caption>
<alt-text>Figura 2 Diferencias entre la prevención de riesgos penales y laborales</alt-text>
<graphic xlink:href="581961489005_gf3.png" />
<attrib>Fuente: Elaboración propia</attrib>
</fig>
<table-wrap id="gf2">
<label></label>
<caption>
<!--<title></title>-->
</caption>
<!--<alt-text></alt-text>-->
<graphic xlink:href="581961489005_gf3.png"/>
</table-wrap>
</p>
How could this problem be solved? I am using lensGalley plugin