Hello everyone,
I am experiencing with OJS 3.3.0.8 the same problem mentioned in this post:
Hi!
I am using OJS 3.3.0-8 with some manually backported patches from newer versions.
When using the Citation Style Language plugin to download a citation, I notice that the filenames incorrectly include underscores at both the beginning and end.
For example, here https://revista.iq.unesp.br/index.php/ecletica/article/view/1492 , when clicking on Download Citation, it generates a filename as:
_Predicting+the+biological+activity+of+selected+phytochemical.ris_, when choosing “Endnote/Zotero/Men…
and I have already applied the patch proposed in this post:
Hello everyone,
I have encountered a new problem with an installation of OJS 3.3.0.8.
When I try to download a file from the editing interface, while the files are still in Review/Copyediting, etc., the file is saved with an underscore at the beginning and the end:
myfile.docx
becomes
_myfile.docx_
and for some users, this is a significant issue because they are unable to open the files.
Has anyone else experienced this problem?
Do you know what might be causing it?
Thank you.
PS: If t…
Despite this, when I download a file in EndNote or BibTex format using Firefox, the downloaded file is preceded by an underscore.
Any suggestion?
Thanks,
Alfredo
naoliv
April 2, 2025, 12:52am
2
You probably also need to update plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php:
diff is:
--- plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php 2021-08-31 12:03:24.000000000 -0300
+++ /var/www/ojs/plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php 2024-09-06 15:08:49.238028571 -0300
@@ -475,7 +475,7 @@
$encodedFilename = urlencode(substr($article->getLocalizedTitle(), 0, 60)) . '.' . $styleConfig['fileExtension'];
- header("Content-Disposition: attachment; filename*=UTF-8''\"$encodedFilename\"");
+ header("Content-Disposition: attachment; filename*=UTF-8''$encodedFilename");
header('Content-Type: ' . $styleConfig['contentType']);
echo $citation;
exit;
Edit: For completeness, to fix the issue I first cited, I updated plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php
as described above, and also lib/pkp/classes/services/PKPFileService.inc.php
.
1 Like
rcgillis
Closed
April 7, 2025, 11:00am
3
This topic was automatically closed after 3 days. New replies are no longer allowed.