Page MenuHomePhabricator

action=formedit PHP Notice: Unexpected clearActionName after getActionName already called
Closed, ResolvedPublic

Description

[2023-06-06T16:54:10.835597+00:00] error.WARNING: [1763337bf126d9e016df22f9] /w/i.php?title=User:Pyscowicz&action=formedit   PHP Notice: Unexpected clearActionName after getActionName already called {"exception":"[object] (ErrorException(code: 0): PHP Notice: Unexpected clearActionName after getActionName already called at /srv/mediawiki/tags/2023-06-05_15:56:59/includes/context/RequestContext.php:307)
[stacktrace]
#0 [internal function]: MWExceptionHandler::handleError()
#1 /srv/mediawiki/tags/2023-06-05_15:56:59/includes/context/RequestContext.php(307): trigger_error()
#2 /srv/mediawiki/tags/2023-06-05_15:56:59/includes/context/RequestContext.php(174): RequestContext->clearActionName()
#3 /srv/mediawiki/tags/2023-06-05_15:56:59/extensions/PageForms/includes/PF_AutoeditAPI.php(461): RequestContext->setTitle()
#4 /srv/mediawiki/tags/2023-06-05_15:56:59/extensions/PageForms/includes/PF_AutoeditAPI.php(1034): PFAutoeditAPI->doStore()
#5 /srv/mediawiki/tags/2023-06-05_15:56:59/extensions/PageForms/includes/PF_AutoeditAPI.php(129): PFAutoeditAPI->doAction()
#6 /srv/mediawiki/tags/2023-06-05_15:56:59/extensions/PageForms/specials/PF_FormEdit.php(103): PFAutoeditAPI->execute()
#7 /srv/mediawiki/tags/2023-06-05_15:56:59/extensions/PageForms/includes/PF_FormEditAction.php(298): PFFormEdit->printForm()
#8 /srv/mediawiki/tags/2023-06-05_15:56:59/extensions/PageForms/includes/PF_FormEditAction.php(32): PFFormEditAction::displayForm()
#9 /srv/mediawiki/tags/2023-06-05_15:56:59/includes/MediaWiki.php(559): PFFormEditAction->show()
#10 /srv/mediawiki/tags/2023-06-05_15:56:59/includes/MediaWiki.php(334): MediaWiki->performAction()
#11 /srv/mediawiki/tags/2023-06-05_15:56:59/includes/MediaWiki.php(925): MediaWiki->performRequest()
#12 /srv/mediawiki/tags/2023-06-05_15:56:59/includes/MediaWiki.php(579): MediaWiki->main()
#13 /srv/mediawiki/tags/2023-06-05_15:56:59/index.php(50): MediaWiki->run()
#14 /srv/mediawiki/tags/2023-06-05_15:56:59/index.php(46): wfIndexMain()
#15 {main}
","exception_url":"/w/i.php?title=User:XXX&action=formedit","reqId":"1763337bf126d9e016df22f9","caught_by":"mwe_handler"} []

Seems to be related to T314008: Promote dirty RequestContext::clearActionName to runtime warning

Event Timeline

Change 928044 had a related patch set uploaded (by Yaron Koren; author: Yaron Koren):

[mediawiki/extensions/PageForms@master] Remove "Unexpected clearActionName ..." PHP notice from MW

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

@Nikerabbit - I "solved" the problem by adding a "@" before the RequestContext::setTitle() calls, which I believe will just silence the notices. I have no idea how to truly solve the problem. What do you think of this fix?

I'm happy for the reduced log spam, given not much progress on T314008: Promote dirty RequestContext::clearActionName to runtime warning. Just worried that it will break in unexpected ways sometime in the future.

Change 928044 merged by jenkins-bot:

[mediawiki/extensions/PageForms@master] Remove "Unexpected clearActionName ..." PHP notice from MW

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

Yaron_Koren claimed this task.

Well, hopefully this is good enough, at least for now. Thanks for the feedback.