https://bugzilla.wikimedia.org/show_bug.cgi?id=51508
Web browser: ---
Bug ID: 51508
Summary: POTD Title returned by expandtemplates is not correct.
Product: MediaWiki
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: API
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
I am using the Wiki API for accessing the entire Wiki.
When I am calling the following API;
http://en.wikipedia.org/w/api.php?action=expandtemplates&format=json&text={{POTD/{{#time:Y-m-d}}|title}}
I get the following output;
{
"expandtemplates": {
"*": "''[[A Wheat Field with Cypresses]]''"
}
}
which I use in the next API as follows to get the actual image for this title.
http://en.wikipedia.org/w/api.php?action=query&prop=pageimages&piprop=thumbnail|name&pithumbsize=240&format=json&redirects=&titles=A%20Wheat%20Field%20with%20Cypresses
But it seems the title contains an additional "A" because of which it gives me
missing element.
{
"query": {
"pages": {
"-1": {
"ns": 0,
"title": "A Wheat Field with Cypresses",
"missing": ""
}
}
}
}
But if I remove "A" from the title it gives me proper details as follows;
{
"query": {
"pages": {
"27773473": {
"pageid": 27773473,
"ns": 0,
"title": "Wheat Field with Cypresses",
"thumbnail": {
"source":
"https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Vincent_Willem_van_Gogh_049.jpg/240px-Vincent_Willem_van_Gogh_049.jpg",
"width": 240,
"height": 191
},
"pageimage": "Vincent_Willem_van_Gogh_049.jpg"
}
}
}
}
This is breaking my Web App which I am developing as the title returned by API
is incorrect. Please let me know if this is an actual bug or the title entered
is incorrect or I am making a mistake somewhere.
Thanks and Regards,
Harin
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l