Page MenuHomePhabricator

HomepageHooks uses MediaWiki\Extension\VisualEditor\VisualEditorApiVisualEditorEditPostSaveHook without declaring VisualEditor as dependency
Closed, ResolvedPublic

Description

As of now, my devwiki shows this when visiting any page:

 Original exception: [3753ffd4176511f43bc39d2a] /mw/ Error: Interface 'MediaWiki\Extension\VisualEditor\VisualEditorApiVisualEditorEditPostSaveHook' not found
Backtrace:
from /home/urbanecm/unsynced/gerrit/mediawiki/extensions/GrowthExperiments/includes/HomepageHooks.php(69)
#0 /home/urbanecm/unsynced/gerrit/mediawiki/core/includes/AutoLoader.php(126): require()
#1 [internal function]: AutoLoader::autoload()
#2 /home/urbanecm/unsynced/gerrit/mediawiki/core/includes/HookContainer/HookContainer.php(330): spl_autoload_call()
#3 /home/urbanecm/unsynced/gerrit/mediawiki/core/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#4 /home/urbanecm/unsynced/gerrit/mediawiki/core/includes/Hooks.php(137): MediaWiki\HookContainer\HookContainer->run()
#5 /home/urbanecm/unsynced/gerrit/mediawiki/extensions/Echo/includes/EchoHooks.php(92): Hooks::run()
#6 /home/urbanecm/unsynced/gerrit/mediawiki/core/includes/Setup.php(821): EchoHooks::initEchoExtension()
#7 /home/urbanecm/unsynced/gerrit/mediawiki/core/includes/WebStart.php(87): require_once(string)
#8 /home/urbanecm/unsynced/gerrit/mediawiki/core/index.php(44): require(string)
#9 {main}

The issue seems to be that HomepageHooks uses MediaWiki\Extension\VisualEditor\VisualEditorApiVisualEditorEditPostSaveHook, which isn't guaranteed to exist – GrowthExperiments doesn't depend on anything but MediaWiki.

Event Timeline

kostajh triaged this task as Medium priority.May 10 2021, 12:11 PM
kostajh added a project: Add-Link.
kostajh moved this task from Backlog to May 10 - May 14 on the Add-Link board.

Change 688338 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Move VisualEditor hook to dedicated handler

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

Change 688338 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Move VisualEditor hook to dedicated handler

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