Page MenuHomePhabricator

Error when moving a page with lua
Closed, ResolvedPublic

Description

This could be somewhat unrelated to Wikidata or Lua (though opportunity to make the code there more robust)

When moving a page that had a script error Lua module involved, I got:

#0 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/TitleLibrary.php(77): Title->isRedirect()
#1 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/TitleLibrary.php(20): Scribunto_LuaTitleLibrary->returnTitleToLua(Object(Title))
#2 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(94): Scribunto_LuaTitleLibrary->register()
#3 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(158): Scribunto_LuaEngine->load()
#4 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(549): Scribunto_LuaEngine->getInterpreter()
#5 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(533): Scribunto_LuaModule->getInitChunk()
#6 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(561): Scribunto_LuaModule->execute()
#7 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/common/Hooks.php(96): Scribunto_LuaModule->invoke('label', Object(PPTemplateFrame_DOM))
#8 [internal function]: ScribuntoHooks::invokeHook(Object(Parser), Object(PPFrame_DOM), Array)
#9 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(3281): call_user_func_array('ScribuntoHooks:...', Array)
#10 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Preprocessor_DOM.php(1077): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#11 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(3068): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#12 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(1148): Parser->replaceVariables(''''''Cool Hand ...')
#13 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(383): Parser->internalParse(''''''Cool Hand ...')
#14 /usr/local/apache/common-local/php-1.21wmf12/includes/content/WikitextContent.php(299): Parser->parse(''''''Cool Hand ...', Object(Title), Object(ParserOptions), true, true, 48983)
#15 /usr/local/apache/common-local/php-1.21wmf12/includes/WikiPage.php(2010): WikitextContent->getParserOutput(Object(Title), 48983, Object(ParserOptions))
#16 /usr/local/apache/common-local/php-1.21wmf12/includes/WikiPage.php(2052): WikiPage->prepareContentForEdit(Object(WikitextContent), 48983, Object(User))
#17 /usr/local/apache/common-local/php-1.21wmf12/includes/Title.php(3848): WikiPage->doEditUpdates(Object(Revision), Object(User), Array)
#18 /usr/local/apache/common-local/php-1.21wmf12/includes/Title.php(3683): Title->moveToInternal(Object(Title), '', true)
#19 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(462): Title->moveTo(Object(Title), true, '', true)
#20 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(97): MovePageForm->doSubmit()
#21 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPage.php(613): MovePageForm->execute(NULL)
#22 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPageFactory.php(487): SpecialPage->run(NULL)
#23 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#24 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(565): MediaWiki->performRequest()
#25 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(458): MediaWiki->main()
#26 /usr/local/apache/common-local/php-1.21wmf12/index.php(59): MediaWiki->run()
#27 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#28 {main}


Version: unspecified
Severity: critical

Details

Reference
bz46427

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:37 AM
bzimport set Reference to bz46427.

I am getting various other errors all over the place with moved pages (and the old pages), not related to wikibase or lua:

No valid null revision produced in Title::moveToInternal
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf12/includes/Title.php(3683): Title->moveToInternal(Object(Title), '', true)
#1 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(462): Title->moveTo(Object(Title), true, '', true)
#2 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(97): MovePageForm->doSubmit()
#3 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPage.php(613): MovePageForm->execute(NULL)
#4 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPageFactory.php(487): SpecialPage->run(NULL)
#5 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#6 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(565): MediaWiki->performRequest()
#7 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(458): MediaWiki->main()
#8 /usr/local/apache/common-local/php-1.21wmf12/index.php(59): MediaWiki->run()
#9 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#10 {main}

Let's figure out if this bug is related to, a consequence of, or separate from bug 46397.

still getting errors

LinkCache doesn't know redirect status of this title: Hudson_River2
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/TitleLibrary.php(77): Title->isRedirect()
#1 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/TitleLibrary.php(20): Scribunto_LuaTitleLibrary->returnTitleToLua(Object(Title))
#2 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(94): Scribunto_LuaTitleLibrary->register()
#3 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(158): Scribunto_LuaEngine->load()
#4 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(549): Scribunto_LuaEngine->getInterpreter()
#5 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(533): Scribunto_LuaModule->getInitChunk()
#6 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(561): Scribunto_LuaModule->execute()
#7 /usr/local/apache/common-local/php-1.21wmf12/extensions/Scribunto/common/Hooks.php(96): Scribunto_LuaModule->invoke('label', Object(PPTemplateFrame_DOM))
#8 [internal function]: ScribuntoHooks::invokeHook(Object(Parser), Object(PPFrame_DOM), Array)
#9 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(3281): call_user_func_array('ScribuntoHooks:...', Array)
#10 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Preprocessor_DOM.php(1077): Parser->braceSubstitution(Array, Object(PPFrame_DOM))
#11 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(3068): PPFrame_DOM->expand(Object(PPNode_DOM), 0)
#12 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(1148): Parser->replaceVariables('The Hudson Rive...')
#13 /usr/local/apache/common-local/php-1.21wmf12/includes/parser/Parser.php(383): Parser->internalParse('The Hudson Rive...')
#14 /usr/local/apache/common-local/php-1.21wmf12/includes/content/WikitextContent.php(299): Parser->parse('The Hudson Rive...', Object(Title), Object(ParserOptions), true, true, 49076)
#15 /usr/local/apache/common-local/php-1.21wmf12/includes/WikiPage.php(2010): WikitextContent->getParserOutput(Object(Title), 49076, Object(ParserOptions))
#16 /usr/local/apache/common-local/php-1.21wmf12/includes/WikiPage.php(2052): WikiPage->prepareContentForEdit(Object(WikitextContent), 49076, Object(User))
#17 /usr/local/apache/common-local/php-1.21wmf12/includes/Title.php(3848): WikiPage->doEditUpdates(Object(Revision), Object(User), Array)
#18 /usr/local/apache/common-local/php-1.21wmf12/includes/Title.php(3683): Title->moveToInternal(Object(Title), '', true)
#19 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(462): Title->moveTo(Object(Title), true, '', true)
#20 /usr/local/apache/common-local/php-1.21wmf12/includes/specials/SpecialMovepage.php(97): MovePageForm->doSubmit()
#21 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPage.php(613): MovePageForm->execute(NULL)
#22 /usr/local/apache/common-local/php-1.21wmf12/includes/SpecialPageFactory.php(487): SpecialPage->run(NULL)
#23 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#24 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(565): MediaWiki->performRequest()
#25 /usr/local/apache/common-local/php-1.21wmf12/includes/Wiki.php(458): MediaWiki->main()
#26 /usr/local/apache/common-local/php-1.21wmf12/index.php(59): MediaWiki->run()
#27 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#28 {main}

need to investigate more, see if I can reproduce it on master, etc.

this bug still happens if I remove all the wikidata lua stuff and just do a basic "hello world" lua script.

moving this to scribunto, although I am guessing it's core-related and could be filed under core.

(In reply to comment #5)

moving this to scribunto, although I am guessing it's core-related and could
be
filed under core.

It's definitely core. The exception you're getting, "LinkCache doesn't know redirect status of this title", is thrown from core Title.php, in isRedirect(). Apparently something (possibly bug 46397) rebroke bug 37209.

It's just that Scribunto is what is happening to call isRedirect().

I couldn't reproduce after the bug 46397 fixes, but at least once person can (Greg).

Closed older resolved bugs as verified.