Last modified: 2013-07-13 19:37:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47227, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45227 - Wikidata API has problems with ZW[N]J and underscores for some links
Wikidata API has problems with ZW[N]J and underscores for some links
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High major with 4 votes (vote)
: ---
Assigned To: Wikidata bugs
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-21 13:07 UTC by reza1615
Modified: 2013-07-13 19:37 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Comment 3 jeblad 2013-03-04 11:37:16 UTC
(In reply to comment #0)

The API does not use the underscore form for titles.

> I had these queries and it shows wrong results
> 
> http://wikidata.org/w/api.
> php?action=wbgetentities&sites=scnwiki&titles=Lista_d%C3%AE_stati_d%C3%AE_Sta
> ti_Uniti&format=jsonfm
> 
> it should show item Q1682357
> 
> http://wikidata.org/w/api.
> php?action=wbgetentities&sites=simplewiki&titles=List_of_U.S.
> _states&format=jsonfm
> 
> 
> it should show item Q1682357
Comment 4 jeblad 2013-03-04 11:44:28 UTC
(In reply to comment #2)

Can't see anything specific, but I guess the landing page use a zwj or zwnj.

The API does not use the underscore form for titles.

> http://wikidata.org/w/api.
> php?action=wbgetentities&sites=dewiki&titles=Liste_deutscher_Jagdflieger_im_Z
> weiten_Weltkrieg&format=jsonfm
> 
> should linked to Q557929
(In reply to comment #1)
> it has bug also with other links!
> for example it works for
> http://wikidata.org/w/api.
> php?action=wbgetentities&sites=fawiki&titles=%D8%A7%DB%8C%D8%B1%D8%A7%D9%86&f
> ormat=jsonfm
> 
> but it doesn't work for 
> http://wikidata.org/w/api.
> php?action=wbgetentities&sites=fawiki&titles=%D9%81%D9%87%D8%B1%D8%B3%D8%AA_%
> D8%A8%D8%B1%D8%AA%D8%B1%DB%8C%D9%86_%D8%AE%D9%84%D8%A8%D8%A7%D9%86%D9%87%D8%A
> 7%DB%8C_%D8%AC%D9%86%DA%AF_%D8%AC%D9%87%D8%A7%D9%86%DB%8C_%D8%AF%D9%88%D9%85&
> format=jsonfm
Comment 5 reza1615 2013-03-04 11:58:40 UTC
(In reply to comment #4)
http://wikidata.org/w/api.php?action=wbgetentities&sites=fawiki&titles=%D9%81%D9%87%D8%B1%D8%B3%D8%AA%20%D8%A8%D8%B1%D8%AA%D8%B1%DB%8C%D9%86%20%D8%AE%D9%84%D8%A8%D8%A7%D9%86%E2%80%8C%D9%87%D8%A7%DB%8C%20%D8%AC%D9%86%DA%AF%20%D8%AC%D9%87%D8%A7%D9%86%DB%8C%20%D8%AF%D9%88%D9%85&format=jsonfm

has ZWNJ inside page title at word خلبان‌های (as below). its item is Q2472049
+خلبان
ZWNJ
های+

for other links you right API also has problem with underscores
Comment 6 reza1615 2013-03-07 11:06:33 UTC
after new deploy it didn't solve :(
it has problem of creating items which doesn't have ZWNJ! like

[[شهرآورد سی و نهم تهران]]

[[بانک پارس]]

[[رده:User lki]]

[[غار علی شیخ]]

[[برج روستای مزاران]]

[[میزان الطب]]

Till now I collected more than 500 pages that API doesn't import them! please solve it becuase bots can not create these pages (I use pywikipedia for creating these items)
Comment 7 reza1615 2013-07-13 19:37:37 UTC
I checked some of the links and they are solved!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links