Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locator l. 30, getCitationItemById(), Context->citationItems is null for bibliography (OK for citation) #170

Open
3 tasks done
glorieux-f opened this issue Sep 13, 2023 · 0 comments

Comments

@glorieux-f
Copy link
Contributor

glorieux-f commented Sep 13, 2023

Please follow the general troubleshooting steps first:

  • I read the README and followed the instructions.
  • I am sure that the used CSL metadata follows the CSL schema.
  • I use a valid CSL stylesheet

Bug reports:

PHP Fatal error:  Uncaught Error: Call to a member function filter() on null in …/citeproc-php/src/Context.php:439
Stack trace:
#0 …/citeproc-php/src/Constraint/Locator.php(30): Seboettg\CiteProc\Context->getCitationItemById('ID001')
#1 …/citeproc-php/src/Constraint/AbstractConstraint.php(91): Seboettg\CiteProc\Constraint\Locator->matchForVariable('page', Object(stdClass))

I have not understood the logic. Fast hack, if ($context->isModeCitation()) in Locator.

Used CSL stylesheet:

nouvelles-perspectives-en-sciences-sociales.csl

Used CSL metadata

[
{
"id": "ID001",
"type": "article-journal",
"title": "A title"
}
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant