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

Native citations import doesn't break citations string into single citations #6331

Closed
Vitaliy-1 opened this issue Nov 12, 2020 · 2 comments
Closed
Assignees
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.

Comments

@Vitaliy-1
Copy link
Collaborator

See: https://forum.pkp.sfu.ca/t/doesnt-import-citations-from-xml/63837

Reported by 2 users, didn't reproduce this by myself.
According to the pkp-lib master branch code, NativeXmlPKPPublicationFilter::parseCitations doesn't insert line breaks between citations to be correctly tokenized by CitationListTokenizerFilter. See:

. I proposed a solution in the thread linked above for testing:

$citationsString = '';
foreach ($n->childNodes as $citNode) {
	$citationsString .= $citNode->textContent() . "\n";
}

Where line break is added after each citation, as it's expected by the tokenizer.

@Vitaliy-1 Vitaliy-1 self-assigned this Nov 13, 2020
Vitaliy-1 added a commit to Vitaliy-1/pkp-lib that referenced this issue Nov 13, 2020
@Vitaliy-1
Copy link
Collaborator Author

PR to pkp-lib master: #6333
@NateWr, can you take a look at this one? I'm not able to test it on master as encountered a problem importing XML through the plugin, suspect because of recent changes.

@Vitaliy-1 Vitaliy-1 added the Bug:1:Low A bug that does not have a severe consequence or affects a small number of users. label Nov 13, 2020
NateWr added a commit that referenced this issue Nov 16, 2020
#6331 Delimit single citations with a line break before import
@NateWr NateWr added this to the OJS/OMP/OPS 3.3 milestone Nov 16, 2020
@NateWr
Copy link
Member

NateWr commented Nov 16, 2020

Thanks @Vitaliy-1! I tested by exporting then importing and this fixed it. 👍

@NateWr NateWr closed this as completed Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.
Projects
None yet
Development

No branches or pull requests

2 participants