Topic on Talk:Structured Discussions

Accidentally converted User pages into Flow talk pages.

3
217.137.227.150 (talkcontribs)

Just installed flow, got it working great on my talk pages however upon trying to get it to work with User_Talk pages I accidentally used the "User" namespace when converting via "convertNamespaceFromWikitext.php".

Is there a way of easilly converting back? I assume not which is a bit unfortunate. If it means losing the content on the User pages is there perhaps an easy way of just destroying all the flow pages?

81.96.55.129 (talkcontribs)

Ok, got it all fixed, had to edit via the database and so far it doesnt seem to have broken anything which is good!

(If anyone is wondering how I even managed this to begin with, its because I accidentally used a space between User and Talk which was fairly stupid of me. Should have made a back up before doing changes like this... live and learn though).

Some caveats are you still have the template at the top, but I guess thats easier to fix than rewriting the content in the destroyed namespace.

First up, get the namespace ID for the namespace you want to revert back. In my case it was "2"

SELECT * FROM `page` WHERE `page_namespace`=2 AND `page_content_model`="flow"

Double check you have the right rows before proceeding, dont want to make an issue even worse.

Then run the query:

DELETE FROM `page` WHERE `page_namespace`=2 AND `page_content_model`="flow"

Now to convert the archived pages back to what they should be:

SELECT * FROM `page` WHERE `page_title` LIKE "%/Archive_1" AND `page_namespace`=2

Double check again with the above select that you have the right rows.

UPDATE `page` SET `page_title`= TRIM(TRAILING "/Archive_1" FROM page_title) WHERE `page_title` LIKE "%/Archive_1" AND `page_namespace`=2

Once sure, run:

UPDATE `page` SET `page_title`= TRIM(TRAILING "/Archive_1" FROM page_title) WHERE `page_title` LIKE "%/Archive_1" AND `page_namespace`=2

Mattflaschen-WMF (talkcontribs)

First, backups are a good suggestion, especially on small wikis when it's pretty fast to make a backup before running such a script.

As far as repairing it, if someone else has this issue I would recommend instead using Manual:DeleteBatch.php and Manual:MoveBatch.php . That will leave your wiki in a more consistent state (the move logs should reflect reality, etc., deleted pages will be in the delete logs and can be undeleted).

You can build the required text files from the DB.

Reply to "Accidentally converted User pages into Flow talk pages."