Page MenuHomePhabricator

Special:RecentChanges in it.wikiversity dies with an internal error
Closed, ResolvedPublicPRODUCTION ERROR

Description

Hello everybody,

@Galessandroni and other it.Wikiversity users reported that this page has an internal error:

https://it.wikiversity.org/wiki/Special:RecentChanges

Moreover, the search bar, instead of containing Search Wikiversità, contains Search {{SITENAME}}.

The same thing happens in the second link of the bottom part of the page, where you can read About {{SITENAME}}. Nevertheless the link works well and takes to the appropriate page.

Thanks for your help!

Event Timeline

Zabe triaged this task as Unbreak Now! priority.May 19 2021, 3:28 PM
Zabe changed the subtype of this task from "Task" to "Production Error".

Seems to be new with wmf.6, thus adding as a blocker.

2021-05-19 15:31:30 [bcf89ab8-639a-47a4-aaa7-df9434894444] mw1327 itwikiversity 1.37.0-wmf.6 exception ERROR: [bcf89ab8-639a-47a4-aaa7-df9434894444] /wiki/Speciale:UltimeModifiche   Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target. {"exception_url":"/wiki/Speciale:UltimeModifiche","reqId":"bcf89ab8-639a-47a4-aaa7-df9434894444","caught_by":"entrypoint"} 
[Exception Wikimedia\Assert\PreconditionException] (/srv/mediawiki/php-1.37.0-wmf.6/vendor/wikimedia/assert/src/Assert.php:49) Precondition failed: This Title instance does not represent a proper page, but merely a link target.
  #0 /srv/mediawiki/php-1.37.0-wmf.6/includes/Title.php(4546): Wikimedia\Assert\Assert::precondition(boolean, string)
  #1 /srv/mediawiki/php-1.37.0-wmf.6/includes/Title.php(4527): Title->assertProperPage()
  #2 /srv/mediawiki/php-1.37.0-wmf.6/includes/PageProps.php(236): Title->getId()
  #3 /srv/mediawiki/php-1.37.0-wmf.6/includes/PageProps.php(105): PageProps->getGoodIDs(array)
  #4 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Wikibase/client/includes/Store/Sql/PagePropsEntityIdLookup.php(46): PageProps->getProperties(array, array)
  #5 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Wikibase/client/includes/Store/Sql/PagePropsEntityIdLookup.php(57): Wikibase\Client\Store\Sql\PagePropsEntityIdLookup->getEntityIds(array)
  #6 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Wikibase/data-access/src/ByTypeDispatchingEntityIdLookup.php(62): Wikibase\Client\Store\Sql\PagePropsEntityIdLookup->getEntityIdForTitle(Title)
  #7 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php(143): Wikibase\DataAccess\ByTypeDispatchingEntityIdLookup->getEntityIdForTitle(Title)
  #8 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php(566): Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings->getEntityId(string, string)
  #9 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxCallback.php(26): Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary->getEntityId(string)
  #10 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
  #11 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxInterpreter.php(113): LuaSandboxFunction->call(LuaSandboxFunction)
  #12 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(296): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
  #13 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(68): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
  #14 /srv/mediawiki/php-1.37.0-wmf.6/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
  #15 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3382): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
  #16 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3067): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
  #17 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
  #18 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(3256): PPFrame_Hash->expand(PPNode_Hash_Tree)
  #19 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPFrame_Hash)
  #20 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(2905): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
  #21 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(1575): Parser->replaceVariables(string)
  #22 /srv/mediawiki/php-1.37.0-wmf.6/includes/parser/Parser.php(648): Parser->internalParse(string)
  #23 /srv/mediawiki/php-1.37.0-wmf.6/includes/cache/MessageCache.php(1321): Parser->parse(string, Title, ParserOptions, boolean)
  #24 /srv/mediawiki/php-1.37.0-wmf.6/includes/specials/SpecialRecentChanges.php(654): MessageCache->parse(string, Title, boolean, boolean, Language)
  #25 /srv/mediawiki/php-1.37.0-wmf.6/includes/specials/SpecialRecentChanges.php(536): SpecialRecentChanges->setTopText(FormOptions)
  #26 /srv/mediawiki/php-1.37.0-wmf.6/includes/specialpage/ChangesListSpecialPage.php(1662): SpecialRecentChanges->doHeader(FormOptions, integer)
  #27 /srv/mediawiki/php-1.37.0-wmf.6/includes/specialpage/ChangesListSpecialPage.php(1673): ChangesListSpecialPage->webOutputHeader(integer, FormOptions)
  #28 /srv/mediawiki/php-1.37.0-wmf.6/includes/specialpage/ChangesListSpecialPage.php(674): ChangesListSpecialPage->webOutput(Wikimedia\Rdbms\ResultWrapper, FormOptions)
  #29 /srv/mediawiki/php-1.37.0-wmf.6/includes/specials/SpecialRecentChanges.php(203): ChangesListSpecialPage->execute(NULL)
  #30 /srv/mediawiki/php-1.37.0-wmf.6/includes/specialpage/SpecialPage.php(646): SpecialRecentChanges->execute(NULL)
  #31 /srv/mediawiki/php-1.37.0-wmf.6/includes/specialpage/SpecialPageFactory.php(1390): SpecialPage->run(NULL)
  #32 /srv/mediawiki/php-1.37.0-wmf.6/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
  #33 /srv/mediawiki/php-1.37.0-wmf.6/includes/MediaWiki.php(917): MediaWiki->performRequest()
  #34 /srv/mediawiki/php-1.37.0-wmf.6/includes/MediaWiki.php(551): MediaWiki->main()
  #35 /srv/mediawiki/php-1.37.0-wmf.6/index.php(53): MediaWiki->run()
  #36 /srv/mediawiki/php-1.37.0-wmf.6/index.php(46): wfIndexMain()
  #37 /srv/mediawiki/w/index.php(3): require(string)
  #38 {main}
Galessandroni lowered the priority of this task from Unbreak Now! to Needs Triage.May 19 2021, 3:36 PM
Galessandroni updated the task description. (Show Details)
Zabe triaged this task as Unbreak Now! priority.May 19 2021, 3:43 PM

I'll just assume that this was accidentally reset when expanding the task description.

Ferdi2005 updated the task description. (Show Details)
thcipriani added a subscriber: thcipriani.

Adding Platform Engineering in addition to Platform Team Workboards as I note that the default column on the latter is named, "not a real column"

I have rolled back 1.37.0-wmf.6 from group 1 wikis, so should not happen anymore on those.

Galessandroni closed this task as Resolved.EditedMay 19 2021, 6:33 PM
Galessandroni claimed this task.

Exactly, now all works well.

Thank you and bye,
Giacomo

@Galessandroni The error hasn't been fixed, we just went back to the old version.

@Galessandroni The error hasn't been fixed, we just went back to the old version.

Ops... This is a little problem.

Sorry I wasn't clear in my previous message. I have "uninstalled" the newer version of mediawiki and moved back to the one from last week which is not surfacing this bug. The bug still has to be fixed and once that is done we will be able to "install" the newer version again. And if all goes fine, https://it.wikiversity.org/wiki/Special:RecentChanges will no more show the error. At that point we can finally mark it resolved :]

Thank you @Galessandroni for the verification!

This is probably caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/688348. They start using PageProps::getProperties(). The problem is that a Title object does not necessarily represent a proper page, e.g. a special page.

Change 692968 had a related patch set uploaded (by Ppchelko; author: Ppchelko):

[mediawiki/core@master] PageProps: be prepared that PageIdentity is not proper title

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

This is probably caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/688348. They start using PageProps::getProperties(). The problem is that a Title object does not necessarily represent a proper page, e.g. a special page.

You are both right and wrong. Wikibase probably shouldn't allow looking up entities for a special page? I don't know, but probably not. On the other hand we should be ready that the PageIdentity we received is actually a Title and is an unexpected special page. The patch above does just that.

As a side note, there should have been an actual error message under the "Internal error" heading. I submitted a patch to fix this: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/692974

Change 692968 merged by jenkins-bot:

[mediawiki/core@master] PageProps: be prepared that PageIdentity is not proper title

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

Change 693028 had a related patch set uploaded (by Jforrester; author: Ppchelko):

[mediawiki/core@wmf/1.37.0-wmf.6] PageProps: be prepared that PageIdentity is not proper title

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

Change 693028 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.6] PageProps: be prepared that PageIdentity is not proper title

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

Mentioned in SAL (#wikimedia-operations) [2021-05-20T06:25:10Z] <ladsgroup@deploy1002> Synchronized php-1.37.0-wmf.6/includes/PageProps.php: Backport: [[gerrit:693028|PageProps: be prepared that PageIdentity is not proper title (T283170)]] (duration: 01m 06s)

Change 696589 had a related patch set uploaded (by Itamar Givon; author: Itamar Givon):

[mediawiki/extensions/Wikibase@master] Typehint files to be modified

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

Change 696590 had a related patch set uploaded (by Itamar Givon; author: Itamar Givon):

[mediawiki/extensions/Wikibase@master] Filter out non PageIdentity titles in PagePropsEntityIdLookup

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

Krinkle added a subscriber: Krinkle.

Tagging Revision-backend as relating to PageIdentity refactor which is tracked there.