Closed (fixed)
Project:
Bibliography & Citation
Version:
2.0.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2018 at 02:27 UTC
Updated:
19 Sep 2023 at 08:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
aardwolf commented@tresero Thanks for information.
We already know about academicpuma/citeproc-php. But seboettg/citeproc-php have some compatibility problems. And it throws warnings all time.
technosophos/LibRIS works good, as we expect. And there's no suggested replacement.
We will try to use funstaff/ref-lib-ris. Maybe it will be good.
Comment #3
antongp commentedComment #4
andy-blumHas any progress been made on this front?
Comment #5
antongp commentedChanges are not ready to be committed yet.
Comment #6
drattar commentedany good news?
how can we help?
Comment #7
antongp commentedHere is patch for switching from
academicpuma/citeproc-phptoseboettg/citeproc-phppackage. The main issue with this change is thatseboettg/citeproc-phppackage requires https://github.com/citation-style-language/locales files to be uploaded to the vendor directory. As one of possible ways to do this is to define a new repository in the (root) composer.json file as it's described in the README.md now:In my opinion, there are 2 major issues with this approach:
Another approach is to manually upload citation-style-language/locales files to the vendor directory, but the issue with updates is the same.
Testing of the patch and feedback, including other ways/workarounds for the citation-style-language/locales files installation, much appreciated.
Thanks!
Comment #8
lolcode commentedAs mentioned above the previous solution has a drawback: It requires manual editing of the composer.json file and then installing the seboettg/citeproc-php
I am willing to attempt to move forward a little by making a patch that replaces the RIS library with the one suggested: funstaff/ref-lib-ris. I see there is a test for this feature so it should be doable and I see that funstaff/ref-lib-ris had a last commit in March 2019 vs. 2012 for technosophos/LibRIS. Certainly an improvement.
When it comes to academicpuma/citeproc-php vs. seboettg/citeproc-php it looks like the latter is very well maintained. Does anyone know what the compatibility issues were when this was tried 3 years ago? I just see a comment here about a Bibtex issue. Are there tests that can be added to validate the change?
Comment #9
lolcode commentedActually I spent a little time on it and the alternate suggested package funstaff/ref-lib-ris does not provide a RIS reader.
I guess that a better solution would be for someone to fork technosophos/LibRIS and publish it on packagist. Its MIT so that should be fine.
I could do that but a maintainer of this module might be more familiar with these file types and be a better maintainer in the long run?
Comment #10
eric_a commentedShameless plug for an important, related, easy and currently RTBC issue: #3212586: Require audiolabs/bibtexparser:^1.0 instead of audiolabs/bibtexparser:dev-master.
Could contributors and followers here take a look at that one? Thanks!
Comment #11
hxdef commented@lolcode
It looks like there is still no working replacement for technosophos/LibRIS. At the same time, the work of the current version does not cause problems for users (let me know if you see any critical flaws here), so for now we plan to leave it as it is.
If you want to fork and maintain technosophos/LibRIS pls go ahead. We would be happy to switch to a stable maintained version.
Comment #12
hxdef commented@Eric_A I don't think that this issue is related to #3212586: Require audiolabs/bibtexparser:^1.0 instead of audiolabs/bibtexparser:dev-master because here we discuss abandoned/deprecated dependencies.
In any case, thanks for your suggestion and detailed explanation. The proposed update will be added in a next release.
Comment #13
corn696Following issue seems to be related Provide correct title case transformation for titles in CSL
Comment #14
aardwolf commented@Corn696
We think #3117780: Provide correct title case transformation for titles in CSL produced by CSL styles only. And the reason not in the library.
Now I try to create detailed instruction about checking and modifying styles. Maybe it will be helpful.
We attached patch to this issue but seems nobody wants to try it.
We got zero responses about patch here.
In any case if you have an easy plan (for module users) to update from academicpuma to seboettg Citeproc library then we are open to patches.
Comment #15
corn696Sorry, i didn't know. The first comment in the referenced issue was a bit misleading.
Would be nice. Looking forward to it.
I would try it, if we had problems caused by it.
Comment #16
a_khalipau commentedUpdated the patch to work with the latest release.
Comment #17
aardwolf commentedThank you @xopoc for the updated patch.
It is applied without problem. Failed tests show different behavior in citeproc libraries.
Comment #18
a_khalipau commentedUpdated patch. Fixed namespace.
Comment #20
rbrandon commentedacademicpuma/citeproc-php is getting further behind and seems that seboettg/citeproc-php has already fixed several of the citation bugs we are seeing, is there any way to help make this transition?
Comment #21
rbrandon commentedUpdate to patch 18 since I see the locales repo is not included, it is my understanding that the modules composer.json needs to have the external libraries for automated testing to pick it up. The README probably still needs to mention to add the library in a sites composer.json since it won't pick it up without the composer merge tool.
Comment #22
rbrandon commentedRan composer validate on this one :-)
Comment #23
rbrandon commentedLets try this again, with the vendor type specified for good measure.
Comment #24
rbrandon commentedUnsurprisingly composer does not like to work that way, lets try using citeproc-php's script directly with a post install command.
Comment #25
rbrandon commentedAdd the post-update/install command as a script.
Comment #26
rbrandon commentedTests are now showing valid failures starting with EntityCitationRenderTest, I will tackle this soon unless someone else gets to this. The test runner shows the applicable errors.
Comment #27
rbrandon commentedInstall locale in the build script as well to cover CI.
Comment #28
rbrandon commentedRemove code check, as that was not there before. (will offer a patch for that in separate ticket)
Comment #29
rbrandon commentedchmod +x the install.sh file from citeproc
Comment #30
bkosborneHi @rbrandon, have you been using the latest patch successfully?
Comment #31
slattery commentedThanks everyone for all the hard work on this, both the effort to identify the changes in interface, and to accommodate the difficult file transfers. I want to recognize that I am new to this and these questions may have been explored.
Does anyone know why seboettg prefers the custom package definition in composer? There are newer academicpuma packages and they look like they are being maintained.
I can't easily find another module that depends on an install.sh. There may be a great number, but I wonder:
1. if we want to try the new packages ourselves - would it work to simplify the install.sh to create symlinks to the updated packages instead of the repo clones?
2. If we should ask seboettg if he could find a way to stop hardcoding part of his path, or allow his vendorPath() to become public and subject to override?
The packages:
https://packagist.org/packages/academicpuma/citation-locales
https://packagist.org/packages/academicpuma/citation-styles
https://packagist.org/packages/academicpuma/locales
https://packagist.org/packages/academicpuma/styles
The private function and the hardcoded include:
https://github.com/seboettg/citeproc-php/blob/develop/vendorPath.php
https://github.com/seboettg/citeproc-php/blob/develop/src/StyleSheet.php
Comment #32
g011um commented@bkosborne I tried the patch from #29 on our dev server (running Drupal 9.4.8) and it resolved a number of issues I was seeing. I haven't done a lot of testing, but my Drupal logs are no longer filled with "Unsupported operand types" errors from academicpuma/citeproc-php and at least one of the issues I was having with improperly formatted citations has been resolved.
Comment #33
srees commentedWith the push for Drupal 10, requiring PHP 8, this is becoming a greater concern as academicpuma has deprecated code that is breaking things.
Comment #34
rbrandon commentedWe have been using the patch from #29 and it seems to have been working well.
Comment #36
adam-vessey commentedErr... I... might've accidentally done a thing? I didn't intend to create the issue fork/branch? I sas just trying to post a comment indicating that adding package entries for
citation-style-language/locales(and[..]/styles) should no longer be necessary, as they appear to have Packagist releases (as of March 2023?).Comment #37
aardwolf commented@adam-vessey
We plan to update dependencies asap after beta3 release
Comment #38
rbrandon commented@aardwolf great, we have had some issues lately with the seboettg library and would love some more eyes on this since the errors from academicpuma are also adding up and we need to get to PHP 8 ASAP.
Comment #39
aardwolf commented@rbrandon
You can switch to latest version 3.0.x-dev and check bibcite on D10 and PHP 8.0+
Or you can try latest 2.0.x-dev for D8, D9
It would be helpful.
Comment #40
tlwatson+1 to patch #29 as a solution; I am using this.
Note in addition to applying this patch, I needed to follow the README instructions of adding the citation-style-language/locales package to my composer repositories list, and then run `composer require citation-style-language/locales seboettg/citeproc-php`. (I also had to make sure that the 'intl' extension was installed in global PHP, in order to get a new enough version of seboettg/citeproc-php to resolve all the PHP 8.1 errors.)
Hopefully if/when this patch gets merged in, we shouldn't have to run `composer require`, as this ought to handle its own composer requirements... but it's necessary for now, so hopefully this comment helps someone else wanting to patch.
Comment #41
aardwolf commentedPatch not actual anymore. We're working on changes.
It can be used as temporary solution now, but we will provide better changes.
Comment #42
ebremner commentedI can confirm that patch 29 works on 2.0.0-beta2 with 9.5.10 and php 8.1
Comment #43
rbrandon commented@aardWolf we are still based of 2.x branch with the patch, and did find that we had a couple bugs fixed by using the most recent tag in seboettg/citeproc-php also we are contributing some small changes there.
One thing to make sure of that is a bug in the 2.x branch of bibcite is that the "given" name in the author data sent to citeproc needs to be trimmed of any whitespace so that it will not cause double abbreviations ie "N. ." instead of "N." when abbreviating "Name"
Comment #46
aardwolf commentedWe updated dependecies in both branches 3.0.x and 2.0.x.
@rbrandon Also, I created new issue.
#3385290: Trim given name