Some problems with Index Copernicus plugin

I have a problem with making XML file by Copernicus plugin.
OJS version 3.1.2.1
After validating file of issue we can see Error 1872 : [The document has no document element. at line -1]

image

1 Like

Hello Roman. Do you resolve your problem? I have the same.

Hi.
Unfortunately NO
I updated this plugin but the problem still remains.
And
I can not understand why the plugin works for one’s issues but for other issues doesn’t.

I had this problem when i generate xml for current issue for any else is OK. Your problem is the same? Or it’s doesn’t matter current or not?

Hi all,

I see that there is a pre-release compatible with OJS 3.2+: Release OJS 3.2 support · a-vodka/ojs_copernicus_export_plugin · GitHub.

1 Like

The problem remains not only when I generate the current issue but and with others.

1 Like

Since we at PKP do not maintain this plugin we can not be much help. The best thing to do is to report an issue on the GitHub repository to try to get the attention of the developer.

1 Like

Hello, Vitaliy. Can you give me link with instruction how to do it? Can’t find it in web. My version of OJS is 3.1.2.4. Thanks!

If 3.1.2, this release shouldn’t be compatible (as it’s stated in the description). I only can suggest the same as Nate, try to contact the developer. I think @a-vodka is registered on this forum.

Dear all,

It seems to be a locale problem. Please check language setting for issue and papers in these issues, which you get error.

Also, please compare you language setting for working and not working issues and papers.

Please, feel free to contact me.

Oleksii

2 Likes

Your link is not working, can you duplicate it?

I resolve this bug trough deleting duplicate metadata on rus language for english article ( left only eng meatadata for article) Try it. Good luck. Thanks all for help.

Hi,

I checked the forum and I don’t see any problem in the metadata or in the language of my issue. I also updated the plugin to the latest version, but it keeps showing me the same thing.

What I did was modify the code in line 314 in the file CopernicusExportPlugin.inc.php, and add the line to remove unwanted characters. Remember that when you put utf-8 encoded strings in an XML document, not all valid utf-8 characters are accepted in an XML document http://www.w3.org/TR/REC-xml/#charsets

So you need to remove the unwanted characters, otherwise you will get a fatal XML parse error like above.

$xml_save = utf8_encode($doc->saveXML());
$xml = preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xml_save);
$xmlDocument->loadXML($xml);
$xmlDocument->loadXML($xmlDocument->saveXML());