[07:21:36] * PaddyF pics up his praise of the mediawiki [07:22:07] short url or not, the software is awesome [15:43:37] PaddyF: perhaps it's not the correct configuration file you're editing or maybe it needs a service reload/restart to apply. Perhaps you can add something else bogus to confirm whether the server config works at all. Eg if you add Redirect /wiki1 /foo does that work? [15:44:02] i always kicked off the service restart. thats for sure [15:44:12] https://www.mediawiki.org/wiki/Manual:Short_URL [15:44:29] the rewrite engine works, a test showed [15:44:30] I assume you found this already but I'll link it just for others in case [15:44:46] i even tried that website that "auto" generates a config [15:45:42] As usual the relevant thing is at the bottom of a page linked from the bottom of another page [15:46:16] https://www.mediawiki.org/wiki/Manual:Short_URL/Apache#Simple_instructions [15:46:29] what i dont understand is - why is everything so smooth and perfectly done just not this shorturl stuff [15:49:24] one moment, maybe the .htaccess file needs to be 1 level higher [15:49:31] will check asap [15:56:21] that would be in /var/lib then instead of /var/lib/mediawiki? [15:56:30] seems wrong, hmmm [16:00:25] nope, 404 error all 10 or 15 attempts now [19:32:08] Hey all. I'm working on a wiki (ephemerisle.org) that had a major spam problem. It seems a previous admin ran a script to clean up the mess. But what it looks like is that the script they ran deleted all of the edits created by bots, but _not_ the page creation. So, I'm left with thousands of pages that have no text, and no history, but clog up the "all pages" and "orphan pages" lists. Does anyone have any suggestions on how to clean up this mess? [19:35:36] Example of one of my "null" pages. [19:35:38] http://ephemerisle.org/index.php/%22When_Is_Free_Not_REALLY_Free_%22 [20:05:26] I'm doing some research myself, and it seems there's a script deleteOrphanedRevisions, which cleans up the "crap" if a page is deleted but the refs remain. But I can't find an inverse which deletes pages that have no history, text, or original edit. [20:06:39] hmm, that's tough. Without knowing what the original script did, the solution is probably going to be some direct db manipulation [20:11:40] well, at least a query to get a list of titles that you can then deleteBatch.php [20:16:02] Is anyone here familiar with the database model. Just to double check, every single page _must_ have at least one associated "text" record, right? [20:20:03] no, revision is what maps to text [20:20:20] page needs to have at least one revision [20:20:46] https://www.mediawiki.org/wiki/Manual:Database_layout might be helpful if you haven't seen it yet [20:21:43] you'd want to look for entries in page where page.page_latest doens't match any revision.rev_id [20:27:53] Thanks! [20:36:21] It seems like it should be pretty straightforward to edit DeleteOrphanedRevisions.php and make it delete RevisionLessPages. [22:36:37] I'm now trying to clean up my spam mess manually. Can anyone help me with the DB model? [22:36:38] I have a new page "Ephemerisle 2020", that has a single revision, and it was created by user "Geekeasy". [22:36:38] The page shows up in the page table fine, there's only one associated revision for the page, BUT there's no associated user for this revision. The rev_user in the revisions table is just 0. [22:36:39] Can someone help me understand where I can find the user who created a page? [22:36:56] http://ephemerisle.org/index.php/Ephemerisle_2020 [22:37:20] what version of mediawiki? [22:37:41] MCR threw a wrench into things a couple years back [22:42:19] adam_: http://ephemerisle.org/index.php?title=Ephemerisle_2020&action=info says that User:Geekeasy created the page. I think that in mw 1.34 you need to look at rev_actor instead of rev_user -- https://www.mediawiki.org/wiki/Actor_migration [22:43:14] I think it's 1.34.1. And thanks! I'll look for rev_actor! [22:45:54] 1.34.1 is EOL, just FWIW :) [22:46:09] Fun fun. It looks like whoever did the upgrade of mediawiki to the new version did not upgrade the db. :-| [22:46:30] mw usually complains very loudly if that's the case [22:46:41] in the sense that random things just break [22:46:56] but... that may explain what you're seeing [22:47:28] so I guess run update.php and see if that changes anything [22:47:38] backup first [22:47:42] <.< [22:47:44] >.> [22:47:53] who doesn't have automated backups? :P [22:48:17] * Reedy pets moonmoon and covers his ears [22:48:23] Does anyone happen to know where instructions are for that migration? [22:48:40] it's handled by running update.php [22:48:47] (as Reedy mentioned make a backup first) [22:50:20] Backup of the DB or backup of the entire site? (Just to be 100% sure) [22:51:01] just the database should be enough. update.php won't nuke files on disk or anything [22:51:13] just the db, but having both backed up is a good idea :) [22:54:20] (note for db backups: if you have innodb tables, which you probably do, copying the files is *not* going to work as a backup. Dump the data via mysqldump) [22:58:01] Already did the backup at the start of the day. update.php gave a bunch of errors, telling me to run cleanupUsersWithNoId.php. [22:58:16] But now that I'm trying that, I'm getting another error. [22:59:23] Maybe got it working... [23:02:10] Nope. Got cleanupUsersWithNoId running, but still getting errors in the update process. [23:02:15] First these: User name "AlejandraSanor" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation. [23:02:47] Then this: [23:02:48] Wikimedia\Rdbms\DBQueryError from line 1603 of /var/www/mediawiki-1.34.1/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? [23:08:02] What's the error? [23:31:29] It looks like my archive table is hosed. [23:31:46] ERROR -- Wikimedia\Rdbms\DBQueryError from line 1603 of /var/www/mediawiki-1.34.1/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? [23:32:04] ERROR -- Query: SELECT ar_id,ar_user,ar_user_text,CASE WHEN ar_user = 0 OR ar_user IS NULL THEN (SELECT actor_id FROM `actor` WHERE (ar_user_text = actor_name) ) ELSE (SELECT actor_id FROM `actor` WHERE (ar_user = actor_user) ) END AS `actor_id` FROM `archive` WHERE ar_actor = '0' AND (1=1) ORDER BY ar_id LIMIT 100 [23:32:13] ERROR - Error: 1242 Subquery returns more than 1 row (localhost) [23:38:45] ok run that query manually [23:38:51] what's the results [23:38:59] I would actually run the subqueries [23:39:14] oh right [23:39:17] I misread the error [23:39:21] do you have several entries named like that in actor table? [23:39:56] Running it manually gives the same error. "Subquery returns more than 1 row " [23:39:57] that shouldn't happen, but we apparently are in borkedland :P [23:40:08] I'm working on manually fixing the archive table. [23:40:20] your actor table is borked [23:40:21] not archive [23:40:47] (well, archive might be borked too, but actor definitely is) [23:40:48] if you are updating from a pre-actor mediawiki version, you may need to simply drop it [23:41:17] SELECT actor_id FROM `actor` WHERE actor_name='AlejandraSanor'; returns several entries? [23:47:29] I already cleaned up the actor table. [23:48:27] I may have fixed archive. Moving on to loggging... [23:50:51] I would restore the database and restart fresh the migration [23:51:28] odds are it will work [23:51:43] rather than trying manually changing the tables [23:57:43] I'm making progress through the update. But getting errors still. Now it's related to the DB structure. [23:57:46] ERROR: Error: 1091 Can't DROP 'img_user_timestamp'; check that column/key exists (localhost) [23:58:03] it was probably already dropped [23:58:15] you have a half-updated db [23:58:30] really, if you have a db backup from before the update [23:58:39] roll back to it and launch update.php again [23:58:39] I'm looking at the image table, and img_user and image_user_text which it's trying to drop are there, but other columns it's trying to drop are missing... [23:59:07] Unfortunately, I don't have a backup from before the update. Just an update before I started work today. [23:59:28] :/