JATSparserPlugin and OldGregg after upgrade to 3.2.1-2

Hi @Vitaliy and others!

I have problems upgrading to 3.2.1-2 and the new version of oldGregg (master branch).

I can not download PDF anymore. Clicking on XML does not download XML, but opens a page with only the image associated with the article.

When I click “XML” I get this Fatal Error:

[Wed Dec 02 14:35:32.084845 2020] [php7:error] [pid 13404] [client xx.xx.xx.xx:xx] PHP Fatal error:  Uncaught Error: Call to undefined method Submission::getSectionTitle() in /var/www/html/journal-folder/cache/t_compile/d118ade78a83c40388f5817abcaf3ad847921f11^c349c6486dffc3f9522ddf8e862439f85662c8a8_0.plugins-6-plugins-generic-jatsParser-generic-jatsParser.articleGalleyView.tpl.php:74\nStack trace:\n#0 /var/www/html/journal-folder/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(248): Block_20241249255fc798240c7e32_06110501->callBlock(Object(Smarty_Internal_Template))\n#1 /var/www/html/journal-folder/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(184): Smarty_Internal_Runtime_Inheritance->callBlock(Object(Block_20241249255fc798240c7e32_06110501), Object(Smarty_Internal_Template))\n#2 /var/www/html/journal-folder/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(186): Smarty_Internal_Runtime_Inheritance->process(Object(Smarty_Internal_Template), Object(Block_20241249255fc798240c7e32_06 in /var/www/html/journal-folder/cache/t_compile/d118ade78a83c40388f5817abcaf3ad847921f11^c349c6486dffc3f9522ddf8e862439f85662c8a8_0.plugins-6-plugins-generic-jatsParser-generic-jatsParser.articleGalleyView.tpl.php on line 74, referer: https://journal.com/index.php/journal/article/view/1629

Where is the PDF-link?

I have changed the settings in the JatsParserPlugin and generated fulltext-xml’s.

I also have problems in showing the Disqus-section from the disqus plugin https://github.com/ajnyga/disqus It appears on default theme.

Best regards,

@eddoff

1 Like

Hi @eddoff,

What version of JATS Parser Plugin are you using or is it also a master branch?

Yes, I used the master branch.

Further I have problems with adding Swedish language files for oldgregg. It used to be only to add a folder sv_SE and a locale.xml into that. But it does not work on the current version

I don’t see a pull request, or you are keeping those locally?

This looks like an error from the JATS Parser Plugin related to the recent changes in OJS regarding publications versioning. It will be fixed in the next release.
The old way how JATS XML galley page was rendered has changed. Now, the new upload full-text tab appears in the Publication’s menu, which allows extracting full-text from JATS XML file, uploaded on the copyediting or production stages. This text appears under the abstract on the article landing page after submission being published. I’m removing rendering of XML galley page by the plugin completely, as it’s redundant.

The part of the code that overrides the XML galley page by the Old Gregg theme is also going to be removed before the release.

Thank you @Vitaliy!

We are about to update to 3.2, but the journals using OldGregg has serious problems due to this. In what timeframe do you plan to have the new version ready?

Yes I had it locally. Now there is a PR in github! https://github.com/Vitaliy-1/oldGregg/pull/125

/@eddoff

Old Gregg theme is compatible with OJS 3.2 so I don’t think there will be a new release before OJS 3.3 is out. As for JATS Parser Plugin, the new release is coming soon. I’d expect it in mid December. If you are interested making a fix, the line that causing a problem is here: https://github.com/Vitaliy-1/JATSParserPlugin/blob/adeac5844a9e25654b516e943ff166fa24babc3c/templates/articleGalleyView.tpl#L32 In OJS 3.2.1 Some part of submission’s logic was transferred to a Publication object, leading some Submission’s methods, like this one, being deprecated or removed.

Dear @Vitaliy

How about my PDF rendering problem, then? A PDF link is not even shown

Further, the images in the text cannot be found anymore? However, when editing the XML in Texture images are shown.

Here is a link to the test upgrade with an example of an article (OJS 3.2.1-2):


and here is the production published version of the same article (OJS 3.1.2-1):

Best regards,

@eddoff

Hi @eddoff,

Yes, it’s removed from the master branch of the JATS Parser Plugin. I’ll re-add those before the release; PDF will be generated statically, the option will appear under the Publication tab.

Cannot reproduce this, e.g.: https://uk.e-medjournal.com/index.php/psp/article/view/242
How this full-text was generated? Can you re-check whether the original JATS XML file contains the attached images with correspondent file name?

I think the xml was generated from your docxtojats script, and some manual editing including Texture plugin.

The XML refers to “Figur 1.jpg”, but in OJS the name is “3255-155-8304-1-17-20200903.jpg” However when I click on “Edit with texture” the image is shown:

In Texture I tried to add an image “Figur1.jpg” and one “Figur 1.jpg”. Both are shown in Texture, but only the one without space is shown in the published version. Do I need to reupload all figures now?

Another question:
Since you are not using galleys anymore for publication. Then should we remove the XML galley? It is not needed anymore, right!?
Is it possible to also choose an XML-galley in the tab “full-text upload”? I mean if the editor has uploaded a edited xml file as an galley then the production ready files will not be the same version as the XML-galley.

Thanks. Hmm, that sounds like an issue but not sure if it’s on the plugin’s side. I’d need to do some tests. URL shouldn’t contain spaces and rawurlencode function here: https://github.com/Vitaliy-1/JATSParserPlugin/blob/39a38d6279447667e14d4632a124ff4e0e679822/JatsParserPlugin.inc.php#L826 ensures that they are properly escaped. It may be possible that I’m missing something or this function doesn’t work as expected or being modified server-side. I’ll take a look soon.

In the JATS Parser Plugin settings (master branch, see plugins tab), there is an option to convert all JATS XML galleys to the article’s full-text at once (Import full-text from galleys). It can help to reduce the amount of manual work. I suggest waiting until the official release, which is planned soon, and then convert galleys but if you have a possibility I would appreciate some testing.

The full-text now is actually a publication property, this means it’s handled in a similar way as abstracts and other publication data. In other ways, JATS Parser Plugin won’t interact with XML galleys. If JATS XML galleys are already there, I suggest not to delete them but leave them as is as it’s a part of an already published publication.

If keeping XML galley the same as a full-text and new XML galley is uploaded, then full-text should be re-generated.
Once again, the idea is to treat a full-text as a Publication’s property, like other data, going away from the concept that it should be displayed as a galley.

Hi @eddoff,

According to JATS XML standards the value of the xlink:xref attribute should be a valid URI. Figur 1.jpg isn’t a valid URI, so I’d discourage such usage. But if Texture allows this, I guess, there is room for a workaround. @eddoff, can you check if changing this line:


to
$srcNode->setAttribute("src", rawurlencode($jatsFigure->getLink()));

makes any difference? (the full-text should be re-generated manually after this change)

Yes, it looks like it is working!

I will wait for your implementation of PDF generation until I can make the production upgrade. I hope you are finished with the implementation soon. :slight_smile:

The best,

@eddoff

Just merged into the master branch yesterday. The checkbox to create a PDF galleys is under the Full Text tab of the Publication. But the release itself is planned short after OJS 3.3. There are other issues that I want to solve plus in 3.2 it’s possible to hit this issue if article’s full-text is long.

Thank you!

I tried to update but could not get it working. Maybe due to that I don’t have Composer installed on the server.

3. To install support for JATS to PDF conversion: `cd jatsParser/JATSParser` and `composer install`.

Can I Install this without composer?
Otherwise I need to wait until after the holidays, to get IT - support.

Best regards,

@eddoff

I think you can install dependencies locally and then create a tar.gz archive to upload to OJS. If you have problems with installing composer locally, let me know, I don’t mind creating a second beta release for testing.

Yes thank you! Please do that! :grinning:

@Vitaliy

Can you please make a package of a second beta?

Best regards, @eddoff

Here: Release 2.1.9-1 · Vitaliy-1/JATSParserPlugin · GitHub
It has a size of 45.3 Mb mostly because of CSL library that the plugin started to use. Let me know how it goes.