Page MenuHomePhabricator

Miraheze: Broken Flow topics with non-existent pages and strange raw JSON data
Closed, ResolvedPublic

Description

We migrated our wiki from LiquidThreads to Flow using the convertAllLqtPages.php script. This seemed to work well, but now multiple major issues were discovered.

a) Topic: pages that only show raw JSON data
https://allthetropes.org/wiki/User_talk:GethN7 looks normal. But, when you want to visit the associated Topic: pages, they are broken.
https://allthetropes.org/wiki/Topic:T4qz1k1gesdtyz2p, https://allthetropes.org/wiki/Topic:T0uwhbm2zggj1jxm and a lot more only show this:

{"flow-workflow":"t4zyg0mdvtcs2z6x"}

b) Topic: pages that do not exist.
This seems to cover every topic that was added after the Flow conversion:
https://allthetropes.org/w/index.php?title=Topic:T5lbk1xrccflyhle&action=edit&redlink=1 https://allthetropes.org/w/index.php?title=Topic:T5l6qnu310nz2zde&action=history

We use MediaWiki 1.26.3, Flow REL1_26 branch, MariaDB 10.0, PHP 5.6.20 @ Debian 8.0. Configuration available at https://github.com/miraheze/mw-config

This is a really critical issue for us. If we need to run some command (or you just need to know something) then please ask.

Event Timeline

Mattflaschen-WMF renamed this task from Broken Flow topics with non-existent pages and strange raw JSON data to Miraheze: Broken Flow topics with non-existent pages and strange raw JSON data.Jun 10 2016, 9:21 PM

One of the problems (hopefully the only one is) https://github.com/miraheze/mw-config/blob/745d3d709300c90438cd5e1e86feb4b7177047de/LocalExtensions.php#L81 . You should never reassign that whole global. Among possible other problems, it clobbers:

$wgNamespaceContentModels[NS_TOPIC] = CONTENT_MODEL_FLOW_BOARD;

in Flow.

Do it one by one like https://www.mediawiki.org/wiki/Extension:Flow#Enabling_Flow or

	$wgNamespaceContentModels = array(
		NS_TALK => CONTENT_MODEL_FLOW_BOARD,
		NS_USER_TALK => CONTENT_MODEL_FLOW_BOARD,
		NS_PROJECT_TALK => CONTENT_MODEL_FLOW_BOARD,
		NS_FILE_TALK => CONTENT_MODEL_FLOW_BOARD,
		NS_MEDIAWIKI_TALK => CONTENT_MODEL_FLOW_BOARD,
		NS_TEMPLATE_TALK => CONTENT_MODEL_FLOW_BOARD,
		NS_HELP_TALK => CONTENT_MODEL_FLOW_BOARD,
		NS_CATEGORY_TALK => CONTENT_MODEL_FLOW_BOARD,
	) + $wgNamespaceContentModels;

That won't recreate the pages that don't exist. For that, run FlowUpdateWorkflowPageId (you may need --force).

Yep, that change (and the maintenance script) worked perfect. Everything is displaying correctly now.

Ugh, well, this was a dumb mistake (and my debugging failed honestly). But you guys are soooo quick to spot that, thank you very much :) Let me know what I need to thank you!

Thanks for the sub :)
Glad to see that we ended up getting a fix for this. It actually appeared that just the namespace content model change fixed the broken pages that I looked as so I'm not exactly sure what the maintenance script did, but glad everything appears to be working.

Thank you for the help Mattflaschen :)

Thanks for the sub :)
Glad to see that we ended up getting a fix for this. It actually appeared that just the namespace content model change fixed the broken pages that I looked as so I'm not exactly sure what the maintenance script did, but glad everything appears to be working.

Primarily (in this case), it creates any pages that do not exist at the core level (page table, etc.)