First letters omitted in some citation styles

Hello, folks. I’m using OJS 3.2.1-1, and I noticed a problem with several citation styles.

There is no problem when using ABNT:

MARTINS, . V. M.; FERREIRA NETTO, . Retomada do tom médio após intervalos de sonoridade. Gradus - Revista Brasileira de Fonologia de Laboratório , Curitiba, v. 4, n. 2, p. 11-31, 2020. Disponível em: //gradusjournal.com/index.php/gradus/article/view/133. Acesso em: 30 jun. 2020.

However, as soon as we change to others styles, several words lose their first letters, either in the title or in the additional information.

APA:

Martins, M. V. M., & Ferreira Netto, W. (2020). Retomada do tom médio após intervalos de sonoridade. radus evista rasileira e onologia e Laboratório , 4 (2), 11-31. ecuperado de //gradusjournal.com/index.php/gradus/article/view/133

Harvard:

Martins, M. V. M. e Ferreira Netto, W. (2020) “Retomada do tom médio após intervalos de sonoridade”, Gradus - Revista Brasileira de Fonologia de Laboratório . Curitiba, 4(2), p. 11-31. isponível em: //gradusjournal.com/index.php/gradus/article/view/133 (cessado: 30junho2020).

Chicago:

Martins, Marcus Vinicius Moreira, e Waldemar Ferreira Netto. 2020. “etomada o om médio após ntervalos e onoridade”. radus evista rasileira e onologia e Laboratório 4 (2). Curitiba:11-31. //gradusjournal.com/index.php/gradus/article/view/133.

Any suggestions?

Luiz Cláudio

Hi @lcduarte,

I suspect this may be related to https://github.com/pkp/pkp-lib/issues/5629. We make use of the (excellent) third-party CiteProc-PHP library for formatting references in various formats, and I suspect updating to a newer release of that library would resolve the issue you’re encountering. We use Composer for PHP dependencies – the Composer descriptor including the CiteProc-PHP dependency is in plugins/generic/citationStyleLanguage/composer.json, and the CiteProc-PHP library itself is included in plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php. You should be able to use Composer to update the dependency. Please confirm if this resolves the issue (and as always, make a good backup before working with dependencies etc).

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, @asmecher. Thanks for your help. Unfortunately, it didn’t help. CiteProc-PHP is already the latest release (2.2.0).

I created a sandbox OJS-3.2.1 installation from scratch, using git, and it presents the same issue. From some comments on CiteProc-PHP github, I downgraded PHP from 7.3 to 7.2, to no avail.

Hi, @asmecher. I have contacted Sebastian Böttger, CiteProc developer. You may find the issue here: https://github.com/seboettg/citeproc-php/issues/ .

Is it possible that OJS is mangling either the input or the output – perhaps with respect to the locale?

Hi @lcduarte,

I don’t think OJS is mangling the data, especially since you can see it working properly with some formats but not others; I think the likeliest cause is something in the citeproc-php library or the CSL files that define each style (neither of which are maintained by PKP).

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks, @asmecher, I’m getting this back to Sebastian, with new test data.

Anyway, while running the tests, I noticed another error in the data passed to CiteProc. The call to CiteProc’s render function is in file plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php, line 415:

$citation = $citeProc->render(array($citationData), 'bibliography');

While inspecting the data sent to the render function, I noticed that $citationData.URL had the value "//gradusjournal.com/index.php/gradus/article/view/133", lacking the URL protocol.

Any idea what may be causing this?

Hi @lcduarte,

Is there any chance you’re using the modification described here?

Regards,
Alec Smecher
Public Knowledge Project Team

Right on target, @asmecher! I rolled back the patch, and now it is working. Thank you!

Also, thanks to Sebastian Böttger, the problem with first letters missing from citation styles was also solved. Upgrading our server from PHP 7.2 to PHP 7.3 did the trick. He thinks that it might have been some misconfiguration from mbstring.

1 Like