An image is not shown in XML

Hi,

I have a problem with an article that has a picture. It is not shown in XML.
Link: https://www.revistas.usp.br/rco/article/view/141359/152916

I double checked and it looks all right, but it doesn’t show up.
I use another plugin, embed gallery plugin, which shows xml on the article page, and in that plugin the image appears.

Regards,
Tarcisio Pereira

Hi @Tarcisio_Pereira

You might be hitting a bug where the mime type of the XML galley is different than what the plugin expects. Please apply the changes indicated here:

Cheers,
Jason

Hi @jnugent

Thank you.
Changes applied but the problem still remains.
Another idea?

Regards,
Tarcisio Pereira

Can you try installing the newest version of the plugin from the repository, in general, and see how that goes?

Thanks,
Jason

Hi @jnugent

Error 500 after install the newest version of te plugin:

[Fri Jul 26 10:46:21.491053 2019] [php7:error] [pid 26576] [client 127.0.0.1:33548] PHP Fatal error: Uncaught Error: Call to undefined method LensGalleyPlugin::getTemplateResource() in /srv/revistas/html/plugins/generic/lensGalley/LensGalleyPlugin.inc.php:73\nStack trace:\n#0 /srv/revistas/html/lib/pkp/classes/plugins/HookRegistry.inc.php(107): LensGalleyPlugin->articleCallback(‘ArticleHandler:…’, Array)\n#1 /srv/revistas/html/pages/article/ArticleHandler.inc.php(201): HookRegistry::call(‘ArticleHandler:…’, Array)\n#2 /srv/revistas/html/lib/pkp/classes/core/PKPRouter.inc.php(372): ArticleHandler->view(Array, Object(Request))\n#3 /srv/revistas/html/lib/pkp/classes/core/PKPPageRouter.inc.php(233): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)\n#4 /srv/revistas/html/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPPageRouter->route(Object(Request))\n#5 /srv/revistas/html/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))\n#6 /srv/revistas/html/index.php(68): PKPApplication->execute()\n#7 {main}\n thrown in /srv/revistas/html/plugins/generic/lensGalley/LensGalleyPlugin.inc.php on line 73

My ojs version is 3.1.1.2.

Regards,
Tarcisio Pereira

Ah, that explains it. I would revert your plugin to the original version, or get the 3.1.1 branch here:

and then examine the mime type in the submission_files table for that particular galley and see if it is text/xml or application/xml. I suspect it may be the former.

Cheers,
Jason

Hi @jnugent

I checked the mime type in the submission_files table for this particular galley and it is “application/xml”. It should be text/xml?

Regards,
Tarcisio Pereira

The original plugin worked perfectly with application/xml, so that shouldn’t be the problem. Are you sure the XML is correct for the image? What is the XML transforming to when you view the resulting HTML?

Cheers,

Hi @jnugent

I have 2 examples now, please take a look in this first.
https://www.revistas.usp.br/rco/article/view/141359/
This article xml has a image:


And I can not see it in elens galley plugin:

And I have this other article with image inside.
http://www.revistas.usp.br/rco/article/view/149212/


But, in this second case, I can see image using elens galley plugin:

Shouldn’t the plugin work the same for both articles?

Regards,

Tarcisio Pereira