Page MenuHomePhabricator

OOUI\Exception occurs when try to insert "https://w" to page
Closed, ResolvedPublicBUG REPORT

Description

Environment:

MW1.33.0
PHP7.3.9

Config:
Just put wfLoadExtension( 'ConfirmEdit' ); to LocalSettings.php. This mean that SimpleCaptcha will default enabled.

Stack trace:

PHP Fatal Error from line 496 of vendor/oojs/oojs-ui/php/Tag.php: OOUI\Exception: OOUI\Theme::singleton was called with no singleton theme set. in vendor/oojs/oojs-ui/php/Theme.php:31
Stack trace:
#0 vendor/oojs/oojs-ui/php/Element.php(241): OOUI\Theme::singleton()
#1 vendor/oojs/oojs-ui/php/Tag.php(494): OOUI\Element->toString()
#2 extensions/ConfirmEdit/SimpleCaptcha/SimpleCaptcha.php(144): OOUI\Tag->__toString()
#3 extensions/ConfirmEdit/SimpleCaptcha/SimpleCaptcha.php(160): SimpleCaptcha->getFormInformation(1)
#4 extensions/ConfirmEdit/SimpleCaptcha/SimpleCaptcha.php(211): SimpleCaptcha->addFormToOutput(Object(OutputPage))
#5 extensions/ConfirmEdit/includes/ConfirmEditHooks.php(84): SimpleCaptcha->showEditFormFields(Object(EditPage), Object(OutputPage))
#6 includes/Hooks.php(174): ConfirmEditHooks::showEditFormFields(Object(EditPage), Object(OutputPage))
#7 includes/Hooks.php(202): Hooks::callHook('EditPage::showE...', Array, Array, NULL)
#8 includes/EditPage.php(2847): Hooks::run('EditPage::showE...', Array)
#9 includes/EditPage.php(712): EditPage->showEditForm()
#10 includes/actions/EditAction.php(60): EditPage->edit()
#11 includes/actions/SubmitAction.php(38): EditAction->show()
#12 includes/MediaWiki.php(499): SubmitAction->show()
#13 includes/MediaWiki.php(294): MediaWiki->performAction(Object(Article), Object(Title))
#14 includes/MediaWiki.php(865): MediaWiki->performRequest()
#15 includes/MediaWiki.php(515): MediaWiki->main()
#16 index.php(42): MediaWiki->run()
#17 {main}

When I insert https://w to a page, the exception will occur. This only happen a user without skipcaptcha right.

This bug was originally reported by a community member, and I can reproduce it.

Event Timeline

I guess some URLs are restricted.

E.g,Https://www.cenelec.eu/dyn/www/f?p=104:151** or Https://www.cenelec.eu**

However, other URLs such as our own are no problem.

It seems that this is because OOUI is not setup in the extension.

RazeSoldier triaged this task as Medium priority.
RazeSoldier changed the subtype of this task from "Task" to "Bug Report".

Change 534902 had a related patch set uploaded (by 星耀晨曦; owner: 星耀晨曦):
[mediawiki/extensions/ConfirmEdit@master] Enable OOUI in SimpleCaptcha

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

Change 534902 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@master] Enable OOUI in SimpleCaptcha

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

Change 535868 had a related patch set uploaded (by Brian Wolff; owner: 星耀晨曦):
[mediawiki/extensions/ConfirmEdit@REL1_33] Enable OOUI in SimpleCaptcha

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

Change 535868 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@REL1_33] Enable OOUI in SimpleCaptcha

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