Page MenuHomePhabricator

Disable TextExtracts on file pages
Closed, ResolvedPublic2 Estimated 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 Jhernandez
Resolved Mholloway
Resolved Fjalapeno
Resolved Pchelolo
Resolved bearND
Resolved Mholloway
Resolved Mholloway

Event Timeline

Jdlrobson raised the priority of this task from to Low.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: TextExtracts.
Jdlrobson subscribed.
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)

@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.

Jdlrobson raised the priority of this task from Low to Medium.Jun 28 2017, 6:49 PM

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

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

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.

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 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.

Mibad! 👍