Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Error inserting citations using Elsevier styles #543

Closed
spaulaus opened this issue Feb 10, 2019 · 6 comments
Closed

Error inserting citations using Elsevier styles #543

spaulaus opened this issue Feb 10, 2019 · 6 comments
Labels

Comments

@spaulaus
Copy link

ABT Version:
5.0.2

PHP Version:
7.2

Theme:
http://themeworx.net/details/corporate/corpworx

Plugin List:

  • Academic Blogger's Toolkit
  • W3 Total Cache

Browser: Google Chrome 72.0.3626.96

Expected behavior/Steps to reproduce:

  1. Enabled Elsevier (numeric, with titles) reference type. Confirmed with other variants of the Elsevier numeric styles.
  2. Add reference from DOI:
    • Breaks when cited: 10.1063/1.3586170
    • Works when cited: 10.1016/j.apradiso.2004.02.024
      image
  3. Type text, select reference, and click "Insert Citation"
    image
  4. Citation is inserted.
  5. Bibliography block is added / updated

Actual behavior:
The citation is inserted, but the bibliography block is destroyed.
image.

Console messages:
https://gist.github.com/spaulaus/362776a566cf14a31b6e54302c54e966

@dsifford
Copy link
Owner

I wish more people would report issues like you.

Thanks for the clarity. I'll try to look into this soon.

@dsifford dsifford added the bug label Feb 10, 2019
@spaulaus
Copy link
Author

No problem! We're all in this together. Let me know if you need additional information.

@dsifford
Copy link
Owner

@spaulaus Goooooooooooooood find. Just got this sorted out locally. This was a pretty wild edge case. Glad to get it smoothed out.

I'll be pushing an update soon that includes the fix for this and a fix for a recent bug in wordpress core preventing the proper storage of citation metadata in postmeta.

Thanks again.

@spaulaus
Copy link
Author

@dsifford : Awesome! Thanks for the quick turn around. Confirmed as working from my side. Out of curiosity, what was it about that DOI that caused the problem?

image

@dsifford
Copy link
Owner

The data returned from crosscite is in a format that is not aligned with the CSL JSON specification (even though they claim to be). So when processing that particular style, when it hit a field that had the incorrect type, a cascading error occurred.

@spaulaus
Copy link
Author

Ah! The old documentation switcheroo. Thanks again for your help with this!

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

No branches or pull requests

2 participants