Page MenuHomePhabricator

Citoid says "We couldn't make a citation for you" for some sites and ISBNs
Closed, ResolvedPublic

Description

After having installed Citoid and followed all the instructions, it seems to be working for some websites (such as Google), but when trying to use BBC as a Citoid or when trying to use an ISBN it says "We couldn't make a citation for you"

Steps to reproduce (provided by @Paladox ) are: https://imgur.com/a/RsSryAJ

MediaWiki version: 1.34.1
PHP: 7.3.14-1~deb10u1 (fpm-fcgi)
Citoid version: version

Event Timeline

Are you using the wmf hosted API, or your own?

The WMF hosted API uses Zotero, and we also have a subscription to WorldCat. This will lead to differing results than if you're hosting it yourself.

You can install Zotero yourself as well. https://www.mediawiki.org/wiki/Citoid#Install_and_configure_Zotero's_translation_server

We use our own, we have it installed with restbase.

But it works with google, but using bbc it seems to not work correctly?

We use our own, we have it installed with restbase.

But it works with google, but using bbc it seems to not work correctly

Have you installed zotero?

You need to install zotero and also make sure it's working - you can check the "source" parameter. If it doesn't say the results are coming from Zotero when you query it with a BBC url, that's probably why bbc isn't working well.

ISBN won't work at all unless you have a working version of zotero or a worldcat key.

We use our own, we have it installed with restbase.

But it works with google, but using bbc it seems to not work correctly

Have you installed zotero?

You need to install zotero and also make sure it's working - you can check the "source" parameter. If it doesn't say the results are coming from Zotero when you query it with a BBC url, that's probably why bbc isn't working well.

ISBN won't work at all unless you have a working version of zotero or a worldcat key.

Yes we have zotero installed.

curl "https://nonbinary.wiki/nonbinary.wiki/v1/data/citation/mediawiki/https%3A%2F%2Fwww.bbc.co.uk%2Fnews%2Fuk-52169648?action=query&format=json"

returns:

[{"key":"YKH7XLP8","version":0,"itemType":"newspaperArticle","tags":[],"title":"Key workers 'overlooked and underpaid' - Starmer","publicationTitle":"BBC News","section":"UK","url":"https://www.bbc.com/news/uk-52169648","abstractNote":"The new Labour leader says the wealthy will have to pay more after the coronavirus crisis.","language":"en-GB","libraryCatalog":"www.bbc.co.uk","accessDate":"2020-04-05","date":"2020-04-05","source":["Zotero"]}]

But yet the UI says "We couldn't make a citation for you. You can create one manually using the "Manual" tab above.".

https://nonbinary.wiki/nonbinary.wiki/v1/data/citation/mediawiki/10.1109%2F5.771073?action=query&format=json"

also returns

[{"key":"UT9L39YQ","version":0,"itemType":"journalArticle","tags":[],"publicationTitle":"Proceedings of the IEEE","journalAbbreviation":"Proc. IEEE","volume":"87","issue":"7","date":"1999-07","pages":"1208–1227","DOI":"10.1109/5.771073","url":"http://ieeexplore.ieee.org/document/771073/","title":"Toward unique identifiers","libraryCatalog":"DOI.org (Crossref)","accessDate":"2020-04-05","author":[["N.","Paskin"]],"source":["Zotero"]}]

We use our own, we have it installed with restbase.

But it works with google, but using bbc it seems to not work correctly

Have you installed zotero?

You need to install zotero and also make sure it's working - you can check the "source" parameter. If it doesn't say the results are coming from Zotero when you query it with a BBC url, that's probably why bbc isn't working well.

ISBN won't work at all unless you have a working version of zotero or a worldcat key.

Yes we have zotero installed.

curl "https://nonbinary.wiki/nonbinary.wiki/v1/data/citation/mediawiki/https%3A%2F%2Fwww.bbc.co.uk%2Fnews%2Fuk-52169648?action=query&format=json"

returns:

[{"key":"YKH7XLP8","version":0,"itemType":"newspaperArticle","tags":[],"title":"Key workers 'overlooked and underpaid' - Starmer","publicationTitle":"BBC News","section":"UK","url":"https://www.bbc.com/news/uk-52169648","abstractNote":"The new Labour leader says the wealthy will have to pay more after the coronavirus crisis.","language":"en-GB","libraryCatalog":"www.bbc.co.uk","accessDate":"2020-04-05","date":"2020-04-05","source":["Zotero"]}]

But yet the UI says "We couldn't make a citation for you. You can create one manually using the "Manual" tab above.".

Have you followed the directions here: https://www.mediawiki.org/wiki/Citoid#Get_%22could_not_make_a_citation_for_you%22_every_time

If you're getting results from the API but none from the extension, it usually means the template data isn't coming through. The difference between some websites and not others is probably that your Cite web is correct (for google) but there's a problem with Cite news (for the bbc article.)

@Mvolz i get a 404 with ISBN (0596519796) but works on en.wikipedia.org. Do you need a subscription to some service for ISBN to work?

curl -X GET "https://nonbinary.wiki/nonbinary.wiki/v1/data/citation/mediawiki/0596519796" -H "accept: application/json; charset=utf-8;"

{"type":"https://mediawiki.org/wiki/HyperSwitch/errors/not_found","title":"Not found.","method":"get","uri":"/nonbinary.wiki/v1/data/citation/zotero/0596519796"}

@Mvolz i get a 404 with ISBN (0596519796) but works on en.wikipedia.org. Do you need a subscription to some service for ISBN to work?

curl -X GET "https://nonbinary.wiki/nonbinary.wiki/v1/data/citation/mediawiki/0596519796" -H "accept: application/json; charset=utf-8;"

{"type":"https://mediawiki.org/wiki/HyperSwitch/errors/not_found","title":"Not found.","method":"get","uri":"/nonbinary.wiki/v1/data/citation/zotero/0596519796"}

Yes, in config.yaml there's a parameter "wskey" which you would need to get from worldcat; our agreement with them only covers us. https://help.oclc.org/Discovery_and_Reference/WorldCat_Discovery/Troubleshooting/How_do_I_request_a_WSKey_for_the_WorldCat_Search_API

But, there's a fallback mechanism that should allow you to get ISBNs from Zotero too- if you set wskey to false and zotero to true, some isbns should work, there are some examples in the tests: https://github.com/wikimedia/citoid/blob/master/test/features/scraping/isbn.js#L23

RhinosF1 moved this task from Radar to Miraheze-Linked on the User-RhinosF1 board.
RhinosF1 subscribed.

Adding to the Miraheze Tracking column

Reception123 claimed this task.

Thank you! This has fixed it for us