Skip to content

FlexForm blocks edit of systemmessage #34

@wgevaert

Description

@wgevaert

Cannot edit message that does not have a page

Steps to reproduce:
0. Install CSP Basis

  1. Set $wgContentlang = 'nl'
  2. Try to edit MediaWiki:Ws-header/EN
  3. Click "preview" ("Bewerking ter controle bekijken")
    You get this error:
[212f27016ca2e8d8d3d953f0] /MediaWiki:Ws-header/EN?action=submit TypeError from line 59 of /wiki/public_html/extensions/FlexForm/src/Core/Rights.php: Argument 1 passed to FlexForm\Core\Rights::isThereAFlexFormInThePageContent() must be an instance of WikiPage, null given, called in /wiki/public_html/extensions/FlexForm/src/Core/Rights.php on line 167

Backtrace:

#0 /wiki/public_html/extensions/FlexForm/src/Core/Rights.php(167): FlexForm\Core\Rights::isThereAFlexFormInThePageContent()
#1 /wiki/public_html/includes/HookContainer/HookContainer.php(329): FlexForm\Core\Rights::disableActions()
#2 /wiki/public_html/includes/HookContainer/HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#3 /wiki/public_html/includes/HookContainer/HookRunner.php(1990): MediaWiki\HookContainer\HookContainer->run()
#4 /wiki/public_html/includes/Permissions/PermissionManager.php(451): MediaWiki\HookContainer\HookRunner->onGetUserPermissionsErrors()
#5 /wiki/public_html/includes/Permissions/PermissionManager.php(409): MediaWiki\Permissions\PermissionManager->checkPermissionHooks()
#6 /wiki/public_html/includes/Permissions/PermissionManager.php(243): MediaWiki\Permissions\PermissionManager->getPermissionErrorsInternal()
#7 /wiki/public_html/extensions/WSSlots/src/Scribunto/ScribuntoLuaLibrary.php(190): MediaWiki\Permissions\PermissionManager->userCan()
#8 /wiki/public_html/extensions/WSSlots/src/Scribunto/ScribuntoLuaLibrary.php(116): WSSlots\Scribunto\ScribuntoLuaLibrary->userCan()
#9 /wiki/public_html/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxCallback.php(26): WSSlots\Scribunto\ScribuntoLuaLibrary->slotData()
#10 [internal function]: Scribunto_LuaSandboxCallback->__call()
#11 /wiki/public_html/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxInterpreter.php(113): LuaSandboxFunction->call()
#12 /wiki/public_html/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(290): Scribunto_LuaSandboxInterpreter->callFunction()
#13 /wiki/public_html/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(68): Scribunto_LuaEngine->executeFunctionChunk()
#14 /wiki/public_html/extensions/Scribunto/includes/common/Hooks.php(140): Scribunto_LuaModule->invoke()
#15 /wiki/public_html/includes/parser/Parser.php(3339): ScribuntoHooks::invokeHook()
#16 /wiki/public_html/includes/parser/Parser.php(3046): Parser->callParserFunction()
#17 /wiki/public_html/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution()
#18 /wiki/public_html/includes/parser/Parser.php(2962): PPFrame_Hash->expand()
#19 /wiki/public_html/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution()
#20 /wiki/public_html/includes/parser/PPTemplateFrame_Hash.php(89): PPFrame_Hash->expand()
#21 /wiki/public_html/includes/parser/Parser.php(3221): PPTemplateFrame_Hash->cachedExpand()
#22 /wiki/public_html/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution()
#23 /wiki/public_html/includes/parser/Parser.php(2886): PPFrame_Hash->expand()
#24 /wiki/public_html/includes/parser/Parser.php(1557): Parser->replaceVariables()
#25 /wiki/public_html/includes/parser/Parser.php(652): Parser->internalParse()
#26 /wiki/public_html/includes/content/WikitextContent.php(374): Parser->parse()
#27 /wiki/public_html/includes/content/AbstractContent.php(590): WikitextContent->fillParserOutput()
#28 /wiki/public_html/includes/EditPage.php(4286): AbstractContent->getParserOutput()
#29 /wiki/public_html/includes/EditPage.php(4191): EditPage->doPreviewParse()
#30 /wiki/public_html/includes/EditPage.php(2969): EditPage->getPreviewText()
#31 /wiki/public_html/includes/EditPage.php(701): EditPage->showEditForm()
#32 /wiki/public_html/includes/actions/EditAction.php(71): EditPage->edit()
#33 /wiki/public_html/includes/actions/SubmitAction.php(38): EditAction->show()
#34 /wiki/public_html/includes/MediaWiki.php(531): SubmitAction->show()
#35 /wiki/public_html/includes/MediaWiki.php(313): MediaWiki->performAction()
#36 /wiki/public_html/includes/MediaWiki.php(947): MediaWiki->performRequest()
#37 /wiki/public_html/includes/MediaWiki.php(547): MediaWiki->main()
#38 /wiki/public_html/index.php(53): MediaWiki->run()
#39 /wiki/public_html/index.php(46): wfIndexMain()
#40 {main}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions