Page MenuHomePhabricator

Regression: Empty extract doesn't trigger generic preview
Closed, ResolvedPublic1 Estimated Story Points

Description

Symptom

When hovering over a link to an article with an empty extract (as returned by the TextExtracts extension) or an extract that is tidied to '', I no longer see the generic preview.

Example(s)

Dwelling on the "Yorkshire Terrier" link (and many, many others) on https://en.wikipedia.beta.wmflabs.org/wiki/Dog yields the following preview:

Under the hood, PP is making an HTTP GET request to https://en.wikipedia.beta.wmflabs.org/api/rest_v1/page/summary/Yorkshire_Terrier, which has an extract of "(Blank.)".

Affected Versions

This affects the next release branch (-wmf.5).

Cause

Overzealous – but still awesome!!1 – refactoring 💥 🦄

Event Timeline

phuedx created this task.Jun 12 2017, 7:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 12 2017, 7:19 AM
Jhernandez triaged this task as High priority.Jun 12 2017, 9:16 AM

TextExtracts also seems to be returning a weird extract here: "(Blank.)". Nevertheless, after having the parentheticals stripped, the extract would be "", which should be rendered as a generic preview.

Change 358345 had a related patch set uploaded (by Jhernandez; owner: Jhernandez):
[mediawiki/extensions/Popups@master] Return empty extract if string is blank after formatting

https://gerrit.wikimedia.org/r/358345

Tested locally with beta cluster as the api and yorkshire terrier as the sample.

phuedx updated the task description. (Show Details)Jun 12 2017, 4:31 PM

Change 358345 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Return empty extract if string is blank after formatting

https://gerrit.wikimedia.org/r/358345

Tested locally with beta cluster as the api and yorkshire terrier as the sample.

I also did this. Also, @Jhernandez's change had a +1 from @pmiazga.

phuedx closed this task as Resolved.Jun 12 2017, 5:13 PM
phuedx set the point value for this task to 1.

The links at the top of https://en.wikipedia.beta.wmflabs.org/wiki/Dog are now working 👌 💪