In T184000 a mechanism was provided for wikidata descriptions to be updated by editors via a magic word. A prop 'description' and prop 'descriptionsource' was added to pages. Currently the mobile web client does not make use of these.
Acceptance criteria
- Ensure MobileFrontend/Minerva/RelatedArticles source from description rather than Wikidata if available in all PHP and API calls.
Developer notes
https://en.wikipedia.org/w/api.php?action=query&prop=description&titles=Wagon_Train
returns
{ "batchcomplete": "", "query": { "normalized": [ { "from": "Wagon_Train", "to": "Wagon Train" } ], "pages": { "1071760": { "pageid": 1071760, "ns": 0, "title": "Wagon Train", "description": "Western television series aired 1957-1965", "descriptionsource": "local" } } } }
In the server side we'll need to get page props
$out->getProperty('description')
Testing
You'll need to use the beta cluster for this.
https://en.m.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein has a wikidata description that should match https://wikidata.beta.wmflabs.org/wiki/Special:EntityPage/Q356553
https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=WOOF_WOOF&venotify=created&mobileaction=toggle_view_mobile
is associated with the Wikidata article https://wikidata.beta.wmflabs.org/wiki/Q450237.
Testing overriden descriptions
Edit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=WOOF_WOOF and ensure the following text is present:
{{SHORTDESC:Woof woof}}
Verify
- When searching for "Woof woof" the description shows as Woof woof.
- When viewing the page "Woof woof" the description under the heading is "woof woof"
- When you visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Monkey and look at related articles, the card "Woof woof" has the description "woof woof"
Testing the blanking behaviour
Edit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=WOOF_WOOF and ensure the following text is present:
{{SHORTDESC:}}
Verify
- When searching for "Woof woof" the description
doesn't showfrom wikidata shows - When viewing the page "Woof woof" the description
under the heading is blank~from wikidata shows - When you visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Monkey and look at related articles, the card "Woof woof"
has no description.~from wikidata shows
[JR: Misunderstood how this works]
Testing the wikidata behaviour
Edit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=WOOF_WOOF and ensure SHORTDESC is NOT present in the wikitext.
Verify
- When searching for "Woof woof" the description shows with the value on wikidata (currently Meow)
- When viewing the page "Woof woof" the description under the heading shows with the value on wikidata (currently Meow)
- When you visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Monkey and look at related articles, the card "Woof woof" has the description "Meow"
Wikis without local override
- We'll want to verify this is also working for wikis which do not have a local override.
I've linked up Spain articles on the beta cluster to a Wikidata entry
- Verify that the wikidata description "Paella, bulls and sangria" shows in search and under the page title on https://en.m.wikivoyage.beta.wmflabs.org/wiki/Spain
- Verify that adding`{{SHORTDESC:}}`into the wikitext creates garbage output on https://en.m.wikivoyage.beta.wmflabs.org/wiki/Spain and doesn't impact the descriptions
- Verify that the Wikidata description "Paella, bulls and sangria" shows up under the title on https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain and within searches.
- Verify that when {{SHORTDESC:}} is entered into the wikitext of the https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain article it changes the description.