Page MenuHomePhabricator

extract and extract_html empty for some page summary responses
Closed, ResolvedPublic

Description

Sometimes the extract and extract_html fields are empty when it seems they shouldn't be:

Request URL:https://en.wikipedia.org/api/rest_v1/page/summary/Vitiligo
Request Method:GET
Status Code:200 
Remote Address:208.80.154.224:443
Referrer Policy:no-referrer-when-downgrade

Response body:
{
  "title": "Vitiligo",
  "displaytitle": "Vitiligo",
  "pageid": 65847,
  "extract": "",
  "extract_html": "",
  "thumbnail": {
    "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Vitiligo2.JPG/320px-Vitiligo2.JPG",
    "width": 320,
    "height": 227
  },
  "originalimage": {
    "source": "https://upload.wikimedia.org/wikipedia/commons/7/75/Vitiligo2.JPG",
    "width": 4100,
    "height": 2910
  },
  "lang": "en",
  "dir": "ltr",
  "timestamp": "2018-02-09T19:13:40Z",
  "description": "hypersensitivity reaction type II disease that causes depigmentation of patches of skin resulting from loss of function or death of melanoctyes."
}

Response headers:
accept-ranges:bytes
access-control-allow-headers:accept, content-type, content-length, cache-control, accept-language, api-user-agent, if-match, if-modified-since, if-none-match, dnt, accept-encoding
access-control-allow-methods:GET,HEAD
access-control-allow-origin:*
access-control-expose-headers:etag
age:32589
cache-control:s-maxage=1209600, max-age=300
content-encoding:gzip
content-length:344
content-location:https://en.wikipedia.org/api/rest_v1/page/summary/Vitiligo
content-security-policy:default-src 'none'; frame-ancestors 'none'
content-type:application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Summary/1.2.0"
date:Sat, 10 Feb 2018 04:32:35 GMT
etag:"824829559/59f87e20-0dcd-11e8-a779-56518bcca680"
referrer-policy:origin-when-cross-origin
server:restbase1017
status:200
strict-transport-security:max-age=106384710; includeSubDomains; preload
vary:Accept-Encoding
via:1.1 varnish-v4, 1.1 varnish-v4
x-analytics:WMF-Last-Access=10-Feb-2018;WMF-Last-Access-Global=10-Feb-2018;https=1
x-cache:cp1068 hit/8, cp1053 hit/14
x-cache-status:hit-front
x-client-ip:73.252.38.252
x-content-security-policy:default-src 'none'; frame-ancestors 'none'
x-content-type-options:nosniff
x-frame-options:SAMEORIGIN
x-request-id:89de494b-0dcf-11e8-8da3-4daeea3c9ff8
x-varnish:66233219 1004481138, 1033855608 955820637
x-webkit-csp:default-src 'none'; frame-ancestors 'none'
x-xss-protection:1; mode=block

Request headers:
:authority:en.wikipedia.org
:method:GET
:path:/api/rest_v1/page/summary/Vitiligo
:scheme:https
accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
accept-encoding:gzip, deflate, br
accept-language:en-US,en;q=0.9
cache-control:no-cache
cookie:CP=H2; GeoIP=US:TN:Cordova:35.14:-89.77:v4; loginnotify_prevlogins=2017-4bna7w-5u9tr14qqj8vtxax4uf44099fgftf9g; VEE=wikitext; enwikiUserID=13204772; enwikiUserName=Niedzielski; centralauth_User=Niedzielski; centralauth_Token=1f3ae7c802862ac7849ccb8288230417; forceHTTPS=true; optin=beta; StewardVoteEligible=0; centralnotice_hide_wikivoyage=%7B%22v%22%3A1%2C%22created%22%3A1518188878%2C%22reason%22%3A%22close%22%7D; enwikiSession=jkp0lninj8ea2pbuhig6ggteljgrqlae; WMF-Last-Access=10-Feb-2018; WMF-Last-Access-Global=10-Feb-2018; centralauth_Session=c1122a7c21f6cc7ee0e617dffec5ede8
pragma:no-cache
upgrade-insecure-requests:1
user-agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.140 Chrome/64.0.3282.140 Safari/537.36
Request URL:https://en.wikipedia.org/api/rest_v1/page/summary/Meghan_Markle
Request Method:GET
Status Code:200 
Remote Address:208.80.154.224:443
Referrer Policy:no-referrer-when-downgrade

Response body:
{
  "title": "Meghan Markle",
  "displaytitle": "Meghan Markle",
  "pageid": 11214029,
  "extract": "",
  "extract_html": "",
  "thumbnail": {
    "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Meghan_Markle_3441.jpg/256px-Meghan_Markle_3441.jpg",
    "width": 256,
    "height": 320
  },
  "originalimage": {
    "source": "https://upload.wikimedia.org/wikipedia/commons/3/39/Meghan_Markle_3441.jpg",
    "width": 3000,
    "height": 3750
  },
  "lang": "en",
  "dir": "ltr",
  "timestamp": "2018-02-09T21:29:34Z",
  "description": "American actress, model, and humanitarian"
}

Response headers:
accept-ranges:bytes
access-control-allow-headers:accept, content-type, content-length, cache-control, accept-language, api-user-agent, if-match, if-modified-since, if-none-match, dnt, accept-encoding
access-control-allow-methods:GET,HEAD
access-control-allow-origin:*
access-control-expose-headers:etag
age:25406
cache-control:s-maxage=1209600, max-age=300
content-encoding:gzip
content-length:295
content-location:https://en.wikipedia.org/api/rest_v1/page/summary/Meghan_Markle
content-security-policy:default-src 'none'; frame-ancestors 'none'
content-type:application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Summary/1.2.0"
date:Sat, 10 Feb 2018 04:37:21 GMT
etag:"824846426/56da81a5-0de0-11e8-bf79-4253a2c8be06"
referrer-policy:origin-when-cross-origin
server:restbase1012
status:200
strict-transport-security:max-age=106384710; includeSubDomains; preload
vary:Accept-Encoding
via:1.1 varnish-v4, 1.1 varnish-v4
x-analytics:WMF-Last-Access=10-Feb-2018;WMF-Last-Access-Global=10-Feb-2018;https=1
x-cache:cp1055 hit/12, cp1053 hit/9
x-cache-status:hit-front
x-client-ip:73.252.38.252
x-content-security-policy:default-src 'none'; frame-ancestors 'none'
x-content-type-options:nosniff
x-frame-options:SAMEORIGIN
x-request-id:edf6840b-0de0-11e8-a021-95de072492b7
x-varnish:666320879 531115850, 1039306678 1001820546
x-webkit-csp:default-src 'none'; frame-ancestors 'none'
x-xss-protection:1; mode=block

Request headers:
:authority:en.wikipedia.org
:method:GET
:path:/api/rest_v1/page/summary/Meghan_Markle
:scheme:https
accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
accept-encoding:gzip, deflate, br
accept-language:en-US,en;q=0.9
cache-control:no-cache
cookie:CP=H2; GeoIP=US:TN:Cordova:35.14:-89.77:v4; loginnotify_prevlogins=2017-4bna7w-5u9tr14qqj8vtxax4uf44099fgftf9g; VEE=wikitext; enwikiUserID=13204772; enwikiUserName=Niedzielski; centralauth_User=Niedzielski; centralauth_Token=1f3ae7c802862ac7849ccb8288230417; forceHTTPS=true; optin=beta; StewardVoteEligible=0; centralnotice_hide_wikivoyage=%7B%22v%22%3A1%2C%22created%22%3A1518188878%2C%22reason%22%3A%22close%22%7D; enwikiSession=jkp0lninj8ea2pbuhig6ggteljgrqlae; WMF-Last-Access=10-Feb-2018; WMF-Last-Access-Global=10-Feb-2018; centralauth_Session=c1122a7c21f6cc7ee0e617dffec5ede8
pragma:no-cache
upgrade-insecure-requests:1
user-agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.140 Chrome/64.0.3282.140 Safari/537.36

TextExtracts provides extracts for both:

https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles=Vitiligo&formatversion=2&exchars=128&exlimit=1

{
  "batchcomplete": true,
  "query": {
    "pages": [
      {
        "pageid": 65847,
        "ns": 0,
        "title": "Vitiligo",
        "extract": "<p><b>Vitiligo</b> is a long-term skin condition characterized by patches of the skin losing their pigment. The patches of skin affected..."
      }
    ]
  }
}
https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&titles=Meghan%20Markle&formatversion=2&exchars=128&exlimit=1

{
  "batchcomplete": true,
  "query": {
    "pages": [
      {
        "pageid": 11214029,
        "ns": 0,
        "title": "Meghan Markle",
        "extract": "<p><b>Rachel Meghan Markle</b> (born August 4, 1981) is an American actress and humanitarian who is set to become a member of the..."
      }
    ]
  }
}

Event Timeline

I think this is probably due to T186927 which happened today. Looks like some of the summary results need to be purged/re-rendered. I guess the ones that had a rerender triggered during the time the bug existed and until the fix was deployed. Not sure if it's worth forcing a rerender on all summaries if we still go ahead with the switchover to summary 1.3.0 soon. We were planning to do that on Monday it might be delayed, see T186933.

The fields are present, just empty, so it's probably fine to wait if the issue isn't prevalent. Page previews handles this case with a "looks like there isn't a preview for this page" message.

I'd expect this is long since resolved. Any cases showing otherwise spotted recently?

Niedzielski claimed this task.

@Mholloway, none that I'm aware of