Jump to content

Topic on Extension talk:UserPageViewTracker/Archive 2

Extension UserPageViewTracker corrupts the database lock mechanisms

1
Summary by Sophivorus

Fixed, please pull or download the latest version. Thanks for the report!

Ulf Dunkel (talkcontribs)

I tried to lock my wiki's database by using the $wgReadOnly parameter in my LocalSettings.php or alternatively calling the Special:LockDB page. This caused a database error like this:

Original exception: [4b98229345b08fc814222a0b] /wiki/Main_Page Wikimedia\Rdbms\DBReadOnlyError from line 1163 of /var/www/vhosts/intactiwiki.org/w/en/includes/libs/rdbms/database/Database.php:

Database is read-only: 2022-02-05: Dumping databases, access will be restored shortly.
Backtrace:
#0 /var/www/vhosts/intactiwiki.org/w/en/includes/libs/rdbms/database/DatabaseMysqlBase.php(1356): Wikimedia\Rdbms\Database->query()
#1 /var/www/vhosts/intactiwiki.org/w/pool/extensions/UserPageViewTracker/SpecialUserPageViewTracker.php(31): Wikimedia\Rdbms\DatabaseMysqlBase->upsert()
#2 /var/www/vhosts/intactiwiki.org/w/en/includes/Hooks.php(174): SpecialUserPageViewTracker::updateTable()
#3 /var/www/vhosts/intactiwiki.org/w/en/includes/Hooks.php(202): Hooks::callHook()
#4 /var/www/vhosts/intactiwiki.org/w/en/includes/parser/Parser.php(1477): Hooks::run()
#5 /var/www/vhosts/intactiwiki.org/w/en/includes/parser/Parser.php(479): Parser->internalParseHalfParsed()
#6 /var/www/vhosts/intactiwiki.org/w/en/includes/content/WikitextContent.php(341): Parser->parse()
#7 /var/www/vhosts/intactiwiki.org/w/en/includes/content/AbstractContent.php(517): WikitextContent->fillParserOutput()
#8 /var/www/vhosts/intactiwiki.org/w/en/includes/Revision/RenderedRevision.php(239): AbstractContent->getParserOutput()
#9 /var/www/vhosts/intactiwiki.org/w/en/includes/Revision/RenderedRevision.php(211): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
#10 /var/www/vhosts/intactiwiki.org/w/en/includes/Revision/RevisionRenderer.php(175): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
#11 /var/www/vhosts/intactiwiki.org/w/en/includes/Revision/RevisionRenderer.php(128): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
#12 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()
#13 /var/www/vhosts/intactiwiki.org/w/en/includes/Revision/RenderedRevision.php(175): call_user_func()
#14 /var/www/vhosts/intactiwiki.org/w/en/includes/poolcounter/PoolWorkArticleView.php(194): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#15 /var/www/vhosts/intactiwiki.org/w/en/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#16 /var/www/vhosts/intactiwiki.org/w/en/includes/page/Article.php(774): PoolCounterWork->execute()
#17 /var/www/vhosts/intactiwiki.org/w/en/includes/actions/ViewAction.php(68): Article->view()
#18 /var/www/vhosts/intactiwiki.org/w/en/includes/MediaWiki.php(501): ViewAction->show()
#19 /var/www/vhosts/intactiwiki.org/w/en/includes/MediaWiki.php(294): MediaWiki->performAction()
#20 /var/www/vhosts/intactiwiki.org/w/en/includes/MediaWiki.php(860): MediaWiki->performRequest()
#21 /var/www/vhosts/intactiwiki.org/w/en/includes/MediaWiki.php(517): MediaWiki->main()
#22 /var/www/vhosts/intactiwiki.org/w/en/index.php(42): MediaWiki->run()
#23 {main}

If I switch off the UserPageViewTracker extension in LocalSettings.php, everything works as expected. What can I do to fix this?