Page MenuHomePhabricator

AJAXPoll should handle when the DB is read-only
Closed, ResolvedPublic

Description

At the moment, any pages that a poll is on displays an error rather than being readable (as you'd at least expect it to be when in read-only mode). Would rather still be able to see the page content, but disable the poll's functionality.

[568919b02298d9ed467d21db63019699] / Wikimedia\Rdbms\DBReadOnlyError from line 1121 of /srv/releases/release_20180923-105244/mediawiki/includes/libs/rdbms/database/Database.php: Database is read-only: Test.

Backtrace:

#0 /srv/releases/release_20180923-105244/mediawiki/includes/libs/rdbms/database/Database.php(2010): Wikimedia\Rdbms\Database->query(string, string)
#1 /srv/releases/release_20180923-105244/mediawiki/extensions/AJAXPoll/includes/AJAXPoll.class.php(126): Wikimedia\Rdbms\Database->update(string, array, array, string)
#2 /srv/releases/release_20180923-105244/mediawiki/includes/parser/Parser.php(3888): AJAXPoll::AJAXPollRender(string, array, Parser, PPFrame_DOM)
#3 /srv/releases/release_20180923-105244/mediawiki/includes/parser/Preprocessor_DOM.php(1362): Parser->extensionSubstitution(array, PPFrame_DOM)
#4 /srv/releases/release_20180923-105244/mediawiki/includes/parser/Parser.php(2942): PPFrame_DOM->expand(DOMElement, integer)
#5 /srv/releases/release_20180923-105244/mediawiki/includes/parser/Parser.php(1293): Parser->replaceVariables(string)
#6 /srv/releases/release_20180923-105244/mediawiki/includes/parser/Parser.php(443): Parser->internalParse(string)
#7 /srv/releases/release_20180923-105244/mediawiki/includes/StubObject.php(112): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#8 /srv/releases/release_20180923-105244/mediawiki/includes/StubObject.php(138): StubObject->_call(string, array)
#9 /srv/releases/release_20180923-105244/mediawiki/includes/content/WikitextContent.php(323): StubObject->__call(string, array)
#10 /srv/releases/release_20180923-105244/mediawiki/includes/content/AbstractContent.php(516): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#11 /srv/releases/release_20180923-105244/mediawiki/includes/poolcounter/PoolWorkArticleView.php(144): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#12 /srv/releases/release_20180923-105244/mediawiki/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#13 /srv/releases/release_20180923-105244/mediawiki/includes/page/Article.php(604): PoolCounterWork->execute()
#14 /srv/releases/release_20180923-105244/mediawiki/includes/actions/ViewAction.php(68): Article->view()
#15 /srv/releases/release_20180923-105244/mediawiki/includes/MediaWiki.php(500): ViewAction->show()
#16 /srv/releases/release_20180923-105244/mediawiki/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#17 /srv/releases/release_20180923-105244/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#18 /srv/releases/release_20180923-105244/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
#19 /srv/releases/release_20180923-105244/mediawiki/index.php(42): MediaWiki->run()
#20 {main}