Flow/Converting LiquidThreads

On the wikis and pages listed at Flow/Comparison with LiquidThreads, we will convert existing LiquidThreads pages to Flow boards and remove Extension:LiquidThreads.

The first wiki converted was "officewiki", the WMF internal wiki. Then in July 2015 mediawiki.org was mostly converted.

What happens in conversion

 * This dates from January 2015 and the behavior may have changed.

Perform some test runs of the maintenance script on single LiquidThreads pages.

Then run the main conversion script.

Both scripts:
 * renames existing LQT pages to page name/LQT_archive
 * the regular wikitext on the LQT page (not threads and replies) becomes the Flow board header
 * attributes most edits to the actual users that worked on the LQT page. Edits that should not be attributed to them are made by a bot user whose name is given by the 'flow-talk-username' message (defaults to "Flow talk page manager").
 * You can consult the history of the /Archive page to get the history of the LQT page, see below
 * moderation actions are lost because the LQT API doesn't report deleted or suppressed LQT threads
 * but these will still be in Deleted Contributions and in the history of items in the Thread namespace


 * removes the  from the Flow board header
 * adds a  template


 * each LQT thread becomes a Flow topic
 * the most recent thread title is the topic title
 * thread title history is lost because the LQT API doesn't report 'Changed subject from "old name" to "new name"' actions.
 * thread summary (if any) is the topic summary
 * summary edit history is preserved (?)
 * each reply becomes a Flow post
 * the history of reply edits is preserved
 * Deeply nested conversations are adjusted in CSS to only 3 levels.


 * Thread: URLs redirect to the new corresponding Topic: page. Thread replies redirect to the corresponding post on a Topic: page.
 * People watching the old Thread: will be watching the new Topic:

The timestamps of the LQT changes are reflected in the timestamps of the Flow posts (and are part of their UUIDs), so RecentChanges and Special:Contributions are not flooded.

Conversion generates a log of mappings:
 * old thread ID (only useful in API) -> new topic UUID

The archive page
The archive page's primary use is to see the history of any edits to the LQT page – not the history of LQT threads added and replied, but the  on the page. On most wikis, LQT pages have little content apart from, but there can be content on the page, and there may be a lot of page text before LQT was enabled.

When LQT is disabled
Once LQT is disabled on the wiki, the archive page will not show LQT threads, since  is no longer present.

LQT namespaces
The Thread and Summary (and their associated _talk) namespaces will still be present. Most pages in the Thread namespace will become redirects to the Flow topic. Their wiki content will be available in history. We will disable editing (for most users) in these namespaces using $wgNamespaceProtection.

Issues

 * If you do not create the template "LQT page converted to Flow" before running the conversion, you have to make a dummy edit to each Flow board header to get it to render.
 * i18n of /LQT_archive and /ArchiveNN strings
 * Possible crash when viewing deeply nested converted thread