seboettg / citeproc-php

Full-featured CSL 1.0.1 processor for PHP
MIT License
73 stars 38 forks source link

Cite-proc does not honor default term for et-al when set on bibliography/citation level #168

Open rbran100 opened 10 months ago

rbran100 commented 10 months ago

Please follow the general troubleshooting steps first:

Bug reports:

When et-al does not have a term specified it does not use the default "et al" in this case it uses NULL, this only applies when the parent et-al element is used.

Used CSL stylesheet:

One Example: https://github.com/citation-style-language/styles/blob/master/nature.csl

Used CSL metadata

Please replace these lines with your used metadata, for instance:

[
    {
        "author": [
            {
                "family": "Anderson", 
                "given": "John"
            }, 
            {
                "family": "Brown", 
                "given": "John"
            }, 
            {
                "family": "Crown", 
                "given": "John"
            }, 
            {
                "family": "Drown", 
                "given": "John"
            }, 
            {
                "family": "Erown", 
                "given": "John"
            }, 
            {
                "family": "Frown", 
                "given": "John"
            }, 
            {
                "family": "Grown", 
                "given": "John"
            }
        ], 
        "id": "ITEM-2", 
        "type": "book",
        "title": "Two authors writing a book"
    }
]
rbran100 commented 10 months ago

@sebboettg you can see how this ends up null if you follow the path here: https://github.com/rbran100/citeproc-php/blob/168-et-al/src/Rendering/Name/Name.php#L329

rbran100 commented 10 months ago

Can confirm that this fix has been working for us in production.