Page MenuHomePhabricator

Disable TextExtracts on file pages
Closed, ResolvedPublic2 Story Points


Trying to obtain a text extract for a foreign file
doesn't work and requesting an extra for a foreign file is not necessarily useful..


  • When an extract is request for a file (local or foreign):
  • An error is returned.
  • No extract is returned.

Sign off steps

Related Objects

Resolved Jdlrobson
Resolved Jdlrobson
Open Jdlrobson
Resolved Jdlrobson

Event Timeline

Jdlrobson updated the task description. (Show Details)
Jdlrobson raised the priority of this task from to Low.
Jdlrobson added a project: TextExtracts.
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 1 2015, 8:22 PM
Jdlrobson renamed this task from TextExtracts on file pages do not really make sense to Disable TextExtracts on file pages.Apr 27 2017, 7:55 PM
Jdlrobson added a project: patch-welcome.
Jdlrobson updated the task description. (Show Details)
phuedx added a subscriber: phuedx.Jun 20 2017, 1:13 PM

@Jdlrobson: Should this be generalised to something like "Don't return extracts for pages outside of the content namespace(s)"?

@phuedx I don't think that's wise at this time since file pages have a clear problem but there may be consumers who use TextExtracts for talk pages/portal pages etc... but we could generalise it so we can easily configure this for other namespaces.

phuedx updated the task description. (Show Details)Jun 22 2017, 12:45 PM
Jdlrobson raised the priority of this task from Low to Normal.Jun 28 2017, 6:49 PM

we missed estimating this because we hide low priority tasks. Shame!

phuedx updated the task description. (Show Details)Jun 29 2017, 5:24 PM
Jdlrobson set the point value for this task to 2.

An error is returned.

What kind of error did you have in mind, @phuedx?

Change 363850 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/extensions/TextExtracts@master] Return empty extract for articles in File namespace

phuedx added a comment.Jul 7 2017, 5:27 PM

Quoting myself from IRC:

i suppose it could be a warning
but generally, if we're going to not generate an extract because the client has requested one for a file page
then we should probably warn 'em
like: "hey. we're not going to do that! :D :D :D lol"
^ actual copy

What I mean is this, if we're not returning an extract for some reason, then we should notify the user as to why. This could be either an error or a warning.

bmansurov removed bmansurov as the assignee of this task.Jul 7 2017, 10:45 PM
bmansurov added a subscriber: bmansurov.

Change 363850 merged by jenkins-bot:
[mediawiki/extensions/TextExtracts@master] Return empty extract for articles in File namespace

Jdlrobson updated the task description. (Show Details)
phuedx claimed this task.Jul 10 2017, 5:05 PM

@phuedx I see the following warning when I visit the URL you pasted and make a request:

"warnings": {
        "extracts": {
            "*": "\"exlimit\" was too large for a whole article extracts request, lowered to 1.\nExtract for a title in File namespace was requested, none returned."

Is the warning in the wrong place? Did you want me to output it somewhere else?

phuedx claimed this task.Jul 11 2017, 1:32 PM
phuedx closed this task as Resolved.

Mibad! 👍