Texture plugin installation error

Dear all,
I encountered errors when installing Texture. I am using upgraded Ojs 3.1.2 from

Here are the logs

[12-May-2019 08:24:38 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getId() on null in /home/u6292709/public_html/plugins/generic/texture/TexturePlugin.inc.php:106
Stack trace:
#0 /home/u6292709/public_html/lib/pkp/classes/plugins/HookRegistry.inc.php(107): TexturePlugin->templateFetchCallback('TemplateManager...', Array)
#1 /home/u6292709/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php(768): HookRegistry::call('TemplateManager...', Array)
#2 /home/u6292709/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php(1385): PKPTemplateManager->fetch('common/loadingC...')
#3 /home/u6292709/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php(1402): PKPTemplateManager->smartyLoadUrlInEl(Array, Object(Smarty_Internal_Template))
#4 /home/u6292709/public_html/cache/t_compile/15364f90ab8e369d2f382d18036f5bbedf485a63^652202841b9a358b5663534995b87eb1fcc7545d_0.core.commonheader.tpl.php(220): PKPTemplateManager->smartyLoadUrlInDiv(Array, Object(Smarty_Internal_Template))
#5 /home/u6292709/public_html/lib/pkp/lib/v in /home/u6292709/public_html/plugins/generic/texture/TexturePlugin.inc.php on line 106

Hi @kawahyu,

It seems that one of the methods is called without a context (not within a journal). Looking at the code, these 2 lines that probably cause the problem aren’t used anywhere: https://github.com/pkp/texture/blob/master/TexturePlugin.inc.php#L100-L101
Can you check if on the line 106 you have this call: $journalId = $journal->getId();?
If yes, can you delete those 2 lines on your instance and tell the results?

Thanks @Vitaliy
I deleted line 106 and the installation works now. I uploaded two samples of XML in the production stage, the 1st is my journal XML created from your tool Docs2Jats and 2nd is test_jats.xml from docxToJats/test_jats.xml at 78b9c0fa46fa77de427b63cf93c8254b1acbd2c5 · Vitaliy-1/docxToJats · GitHub

The 1st XML results

The 2nd is below

Is there an example of XML which could be edited via Texture?

Texture expects metadata. Use DOCXconverter plugin, it produces suitable output for editing with Texture: GitHub - Vitaliy-1/docxConverter: Plugin for OJS 3 that parses DOCX and converts it to JATS XML format
If you haven’t worked with Git before, I’ll compose a beta release soon.

1 Like

Usually PHP is compiled with all needed libraries for DOCX Converter Plugin but if encounter problems, you may check if php-xml and php-zip are installed on your server. In Ubuntu they can be installed by sudo apt install php-xml php-zip for the default version or sudo apt install php7.3-xml php7.3-zip where 7.3 is php version you are working with.

1 Like