WikiClientLibrary icon indicating copy to clipboard operation
WikiClientLibrary copied to clipboard

Enity SiteLink URL is always null

Open FaFre opened this issue 5 years ago • 1 comments

For some reason the URL for SIteLink's is always null.

var entity = new Entity(_wikiDataSite, "Q1022");
                await entity.RefreshAsync(
                    EntityQueryOptions.FetchAllProperties
                );

image

I also tried around with EntityQueryOptions e.g. setting only FetchSiteLinkURL and so on, but I couldn't get it working. Is this a library Problem, or has it something to do with the Wiki-Site I'm querying? (Wikidata)

FaFre avatar Dec 01 '20 08:12 FaFre

That's interesting since there is unit test covering this part https://github.com/CXuesong/WikiClientLibrary/blob/19a365830ffe1859218aad7640161a0f0d4efc9d/UnitTestProject1/Tests/WikibaseTests.cs#L149-L154

Can you perhaps check the actual response from MW? E.g.

https://www.wikidata.org/wiki/Special:ApiSandbox#action=wbgetentities&format=json&ids=Q1234&props=sitelinks

CXuesong avatar Dec 05 '20 16:12 CXuesong