Open Vitaliy-1 opened 4 years ago
@Vitaliy-1, I've removed the whitespaces from the plugin listing on the PKP website -- if we do add whitespace trimming, it'll still leave the problem for users of OJS versions that don't contain that fix. Removing the whitespace on the PKP server will fix it for everyone. But I'll leave this entry open and add a "try me" tag for someone who wants to add the trim call.
I've encountered the problem with downloading the Immersion theme from the plugin gallery (OJS 3.1.2-1). In the logs:
(line breaks preserved) While debugging, I've noticed that
copy()
method doesn't work correctly if one of the parameters is a string embraced with whitespaces or line breaks: https://github.com/pkp/pkp-lib/blob/master/classes/file/FileManager.inc.php#L181 And this is just the case for the URL, taken from thepackage
tag of the latest Immersion theme release. The content of this element in theplugins.xml
contained line breaks after the opening and before the closing tag. @asmecher , as it doesn't affect XML validity, I suggest trimming the package URL (the content of thepackage
tag) before supplying it to the copy method. I haven't explored if this appears in other places.