Page MenuHomePhabricator

EnableStructuredDiscussions should allow bulk lists of pages to enable
Open, Needs TriagePublic

Description

Special:EnableStructuredDiscussions is great. Alas one can spend several hours pasting in the name of existing talk pages to convert, and then pressing Submit.

It should also take a list of pages, like Special:Export.

Or at least on https://www.mediawiki.org/wiki/Help:Structured_Discussions/Activation mention how do deal with many pages.

Yes, often the user has nothing to fill in for the big 'Initial description of Structured Discussions board (wikitext)' box below, so disallowing it for multiple page submissions would be no big loss.

Note I am talking about e.g., Miraheze here, not Wikimedia wikis.

Event Timeline

Restricted Application added subscribers: RhinosF1, Aklapper. · View Herald Transcript

No know solution: https://phabricator.miraheze.org/T5504#108690 .
Wish there was an API way.
I tried using a curl script, but need to get a new token each time, etc.

Workaround:

#!/usr/bin/perl
# Automate Enable Structured Discussions...
# https://phabricator.miraheze.org/T5504#107946
# Copyright       : https://www.fsf.org/copyleft/gpl.html
# Author          : Dan Jacobson -- https://www.jidanni.org/
# Created On      : Mon May 11 21:00:19 2020
# Last Modified On: Mon May 11 21:52:32 2020
# Update Count    : 9
use strict;
use warnings FATAL => 'all';
use utf8;
use WWW::Mechanize;
my @pages = qw/
Talk:Barf
Talk:Bla
etc.
  /;

my $mech = WWW::Mechanize->new;
$mech->add_header( cookie =>'...');    #Cookies from browser's Developer Tools
for (@pages) {
    $mech->get(
        "https://my.wiki.example.com/wiki/Special:EnableStructuredDiscussions"
    );
    $mech->submit_form( with_fields => { wppage => $_ } );
}