[15:14:48] attempt 42 to fix an old wiki. i am on 1.43.5 but apparently the database is inconsistent. i get "Error" "There is currently no text in this page." on some pages. their histories are working though, both the first and latest revisions load fine if i load them directly [15:15:31] i tried "php maintenance/run.php AttachLatest --regenerate-all --fix" and it said "Done! Processed 1009 pages." but also spammed countless lines of "Warning: Invalid JSON object in comment: [Called from MediaWiki\CommentStore\CommentStore::getCommentInternal" [15:15:38] the sites still do not load [15:16:04] any idea how i can tell mediawiki that yes, the first and latest revisions are there and they are ok? [15:18:04] if i try to run "php maintenance/run.php migrateActors" i get 'Error: Undefined constant "DB_MASTER"' [15:18:51] trying to run https://www.mediawiki.org/wiki/Manual:FindAnomalies.php gives 'Error: Undefined constant "DB_SLAVE"' [16:10:53] hannes_: that sounds really weird and like as if your .php files aren't all up to date -- DB_SLAVE was renamed DB_REPLICA and DB_MASTER was renamed DB_PRIMARY and both of those renamings (which I think are very silly) happened quite a while ago, circa MW 1.35 or so [16:22:16] ooph [21:29:33] As a follow-up from the other day, I did indeed discover that the reason my database was being hammered was the Special:NewFiles. I installed the lockdown extension and restricted it to logged in users, and now the database is performing normally again. [22:34:03] gotta love them AI scraper bots, eh [23:28:52] if your users don't really use the special page, there is a native way in core to disable the special page instead of a whole new extension [23:29:10] and if you think of any ways to improve the db query on the page, don't hesitate to file a task [23:35:41] p858snake|cloud: !details (on the 1st one) [23:47:54] ashley: eg: $wgSpecialPages['ManageMessageGroups'] = DisabledSpecialPage::getCallback( 'ManageMessageGroups' ); [23:48:01] i never said it was a clean way to do it [23:50:10] that's fairly clean-ish, I just wasn't aware of there being a DisabledSpecialPage in core :) (@since when, though?) you should document that on e.g. [[mw:Extension:DisableSpecialPages]] and such ;) [23:52:07] asking the person that doesn't code to touch documentation lol [23:52:22] I had to search noc for it, because I know we've used it befpre [23:53:45] 1.33 apparently https://doc.wikimedia.org/mediawiki-core/master/php/classMediaWiki_1_1SpecialPage_1_1DisabledSpecialPage.html#details