Page MenuHomePhabricator

Popups should break without TextExtracts and PageImages installed
Closed, ResolvedPublic

Description

Just wasted 10 minutes of my life debugging why Popups wasn't working.
Discovered TextExtracts was not installed.

Extension page says "This extension has a hard dependency on Extension:TextExtracts and Extension:PageImages." but the extension doesn't enforce these. If they are hard dependencies please enforce this in the ExtensionSetup hook.

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Page-Previews.
Jdlrobson subscribed.
jhobs set Security to None.
Jdlrobson raised the priority of this task from Low to Medium.Apr 20 2016, 5:49 PM

I just wasted 15 minutes debugging something caused by this issue again.

The Popups beta feature is added to Special:Preferences provided that PopupsBetaFeature is true.

The ResourceLoader module however only adds the module if this is true, the beta feature is enabled, BetaFeatures, TextExtracts and PageImages extensions are installed.

We should create a helper method isPopupsEnabled that encapsulates, simplifies and standardises all this logic for the sanity of everyone and to avoid more time wasting.

Expected:
If TextExtracts and PageImages are not installed the beta feature should not show up in Special:Preferences

Jdlrobson lowered the priority of this task from Medium to Low.Jul 28 2016, 8:46 PM
Jdlrobson raised the priority of this task from Low to Medium.
Jdlrobson added a project: Technical-Debt.
Jdlrobson moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.

This should be trivial once rEPOP4958e40c5ce5: Hygiene: Improve code quality by reaching 100% coverage is merged as it introduces PopupsContext#areDependenciesMet.

Jdlrobson claimed this task.

I see this in the error log:

[popups] Popups requires the PageImages and TextExtracts extensions. If Beta mode is on it requires also BetaFeatures extension

So I guess this is better than nothing :)