Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in displaying supplementary files - img #68

Open
Ppantaleo opened this issue Feb 27, 2024 · 5 comments · May be fixed by #69
Open

Error in displaying supplementary files - img #68

Ppantaleo opened this issue Feb 27, 2024 · 5 comments · May be fixed by #69

Comments

@Ppantaleo
Copy link

Hello, I extend this problem presented in the forum: https://forum.pkp.sfu.ca/t/error-al-visualizar-imagenes-actualizando-desde-version-3-3-0-14-a-3-4-0-4/86655

Problem: In version 3.4.0.4 the XML does not show the image.

In previous versions an image is uploaded as a complementary file and the URL is completed correctly:

Imagen de WhatsApp 2024-02-26 a las 16 47 32_3b994593

In version 3.4.0.4, the image loads in the same way but is not displayed. Inspecting the URL does not load correctly for the supplementary file.

2

@Ppantaleo
Copy link
Author

To fix the error with version 3.4.0.4 you had to work with the file LensGalleyPlugin.php

Line 194:

if ($galley && in_array($galley->getFileType(), ['application/xml', 'text/xml']) && $galley->getData('submissionId') == $fileId)

Change to:

if ($galley && in_array($galley->getFileType(), ['application/xml', 'text/xml']) && $galley->getData('submissionFileId') == $fileId)

A wrong call

line 280:

$issue = Repo::issue()->getBySubmissionId($galley->getData('submissionId'));

$galley->getData('submissionId') da null

Change to:

//Modificación 27-07-2024 para pasar por encima error
$submissionFileAux = $galley->getFile();
$submissionIdAux = $submissionFileAux->getData('submissionId');

// Perform variable replacement for journal, issue, site info
$issue = Repo::issue()->getBySubmissionId($submissionIdAux)

@asmecher
Copy link
Owner

asmecher commented Apr 9, 2024

Thanks, @Ppantaleo! Could you open a pull request with your proposed fix?

netmas added a commit to netmas/lensGalley that referenced this issue Apr 16, 2024
@asmecher
Copy link
Owner

Thanks, @netmas and @Ppantaleo!

@withanage, could you review the attached PR?

@withanage
Copy link
Collaborator

Thanks a lot @netmas and @Ppantaleo!
@asmecher I will test the functions and come back here!

@withanage
Copy link
Collaborator

@Ppantaleo and @netmas

Sorry, my eralier request did not come properly!
I have reviewed your PR and sent some small comments. Please have a look !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants