Page MenuHomePhabricator

Page Previews do not require TextExtracts & PageImages when RestbaseAPI is used.
Closed, ResolvedPublic2 Estimated Story Points

Description

Problem

Currently Page-Previews has a hard dependency on TextExtracts and PageImages but those are required only when PopupsGateway is set to mwApiPlain.

We shouldn't depend on extensions that are not required to run. RestbaseHTML is a default gateway on production wikis.

Developer notes

Require TextExtracts and PageImages only when gateway is set to mwApiPlain.
Logic is inside PopupsContext::areDependenciesMet and will need tests.

Event Timeline

ovasileva triaged this task as Medium priority.Mar 27 2018, 3:07 PM
ovasileva moved this task from Incoming to Triaged but Future on the Web-Team-Backlog-Archived board.
Aklapper renamed this task from Page Preveiws do not require TextExtracts & PageImages when RestbaseAPI is used. to Page Previews do not require TextExtracts & PageImages when RestbaseAPI is used..Mar 27 2018, 3:37 PM
Jdlrobson set the point value for this task to 2.

Change 422581 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/Popups@master] PopupsContext::areDependenciesMet should respect PopupsGateway config

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

Change 422581 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] PopupsContext::areDependenciesMet should respect PopupsGateway config

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

Jdlrobson claimed this task.
Jdlrobson subscribed.

This is a technical task so skipping QA.
I've verified that I can disable TextExtracts and PageImages locally and Page previews continues to work when REST is installed.
When mwAPI is being used it disables itself in this combination (turning back on it works again).

This is beautiful I now no longer have to run TextExtracts locally! ;-) Thanks!