Jump to content

Extension talk:StructuredDiscussions/2022

Add topic
From mediawiki.org

Any questions about the StructuredDiscussions extension.

Postgres Required due to Echo status

[edit]

Currently, Echo is required which does not have Postgres support.

Perhaps it should be updated that StructuredDiscussions only support MySQL right now. Rijvirajib (talk) 21:16, 21 January 2022 (UTC)Reply

Flow

[edit]

Is Flow being discontinued next year? 197.202.110.178 (talk) 08:10, 10 June 2022 (UTC)Reply

Development on Structured Discussions ("Flow") was cancelled in 2015. Jdforrester (WMF) (talk) 14:49, 10 June 2022 (UTC)Reply
Are there any discussions about how to migrate to comment streams? Revansx (talk) 14:37, 12 June 2022 (UTC)Reply
I had not heard of Extension:CommentStreams before; I think you should ask on that talk page, but probably not. Jdforrester (WMF) (talk) 13:19, 13 June 2022 (UTC)Reply
How about migration to the new talk page system in use on the English Wikipedia? Tinss (talk) 15:20, 21 July 2022 (UTC)Reply

Doesn't work

[edit]

MediaWiki version 1.37.2

I have installed all dependencies and checked special:version to ensure all of them have been installed successfully. But it seems that Flow isn't applied. And no warning no error, just like I haven't installed Flow. I cant figure it out and really upset.

Is there any configuration to pay attention to? Thanks for any help. SaltyMolaontheMoon (talk) 19:03, 15 June 2022 (UTC)Reply

Did you add $wgNamespaceContentModels[NS_TALK] = 'flow-board'; $wgNamespaceContentModels[NS_USER_TALK] = 'flow-board'; to your LocalSettings.php? Konodiol (talk) 22:10, 30 June 2022 (UTC)Reply

Enable the visual editor on the mobile frontend

[edit]

In mobile mode, only the wikicode is available which is problematic as most users are not versed in wikicode edition. Below is a patch to enable the visual editor in mobile mode.

There is however one bug that I cannot solve: searching users to tag them does not work, the exact user name has to be entered.

In extension.json

[edit]

Above "ext.flow.visualEditor":

"ext.flow.mobileVisualEditor": {
	"scripts": [
		"editor/editors/visualeditor/mw.flow.ve.Target.js",
		"editor/editors/visualeditor/mw.flow.ve.UserCache.js",
		"editor/editors/visualeditor/ui/inspectors/mw.flow.ve.ui.MentionInspector.js",
		"editor/editors/visualeditor/ui/tools/mw.flow.ve.ui.MentionInspectorTool.js",
		"editor/editors/visualeditor/ui/tools/mw.flow.ve.ui.MWEditModeTool.js",
		"editor/editors/visualeditor/ui/contextitem/mw.flow.ve.ui.MentionContextItem.js",
		"editor/editors/visualeditor/ui/widgets/mw.flow.ve.ui.MentionTargetInputWidget.js",
		"editor/editors/visualeditor/mw.flow.ve.CommandRegistry.js",
		"editor/editors/visualeditor/mw.flow.ve.SequenceRegistry.js"
	],
	"styles": [
		"editor/editors/visualeditor/mw.flow.ve.Target.less"
	],
	"dependencies": [
		"ext.visualEditor.core",
		"ext.visualEditor.core.mobile",
		"ext.visualEditor.mediawiki",
		"ext.visualEditor.mwwikitext",
		"ext.visualEditor.switching",
		"mediawiki.editfont.styles",
		"oojs-ui.styles.icons-editing-advanced",
		"ext.flow.visualEditor.icons",
		"mediawiki.api",
		"mediawiki.util"
	],
	"messages": [
		"flow-ve-mention-context-item-label",
		"flow-ve-mention-inspector-title",
		"flow-ve-mention-inspector-remove-label",
		"flow-ve-mention-inspector-invalid-user",
		"flow-ve-mention-placeholder",
		"flow-ve-mention-tool-title"
	],
	"targets": [
		"mobile"
	]
},

In "ext.flow.visualEditor.icons":

"targets": [
	"desktop",
	"mobile"
]

In extensions/Flow/modules/flow/ui/widgets/editor/mw.flow.ui.EditorWidget.js

[edit]

Comment out !OO.ui.isMobile() in

mw.flow.ui.EditorWidget.static.isVisualEditorSupported = function () {
	/* global VisualEditorSupportCheck:false */
	return !!(
		//!OO.ui.isMobile() &&
		mw.loader.getState( 'ext.visualEditor.core' ) &&
		mw.user.options.get( 'flow-visualeditor' ) &&
		window.VisualEditorSupportCheck && VisualEditorSupportCheck()
	);
};


Replace line modules = [ 'ext.flow.visualEditor' ].concat(

with modules = [ OO.ui.isMobile() ? 'ext.flow.mobileVisualEditor' : 'ext.flow.visualEditor' ].concat( Tinss (talk) 17:43, 21 July 2022 (UTC)Reply

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


How do you search an archive of structured discussions? Bovlb (talk) 15:54, 16 August 2022 (UTC)Reply

Hello,
There is a configuration parameter named $wgFlowSearchEnabled which defaults to false because it's is still experimental.
Sadly, integration with Elastic has been removed in some recent commits.
If you give it a go tell me about it because we could petition the dev team to put it back in. Tinss (talk) 14:46, 26 September 2022 (UTC)Reply
Thanks. I'll start a discussion. Bovlb (talk) 15:30, 26 September 2022 (UTC)Reply
Cool, please cc me or give me link here so I can subscribe. Tinss (talk) 16:33, 26 September 2022 (UTC)Reply
wikidata:Wikidata:Report_a_technical_problem#Search_of_structured_discussions Bovlb (talk) 16:53, 26 September 2022 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

VisualEditor does not work on Flow (Structured discussions) talk pages.

[edit]
# In LocalSettings.php, explicitely load Parsoid like so: wfLoadExtension( 'Parsoid', "vendor/wikimedia/parsoid/extension.json" );
  1. Apply the patch

After upgrading from 1.38.4 to 1.39.0 VisualEditir does not work at Flow (Structered discussions) talk pages having following error:

[Y48AWn@IyD2bEpG6yTCgxAAAAgY] Exception caught: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion

Previously I had such problem but the patch helped to resolve the problem, but now it doesn't help.

Any ideas how to resolve the problem? Fokebox (talk) 12:24, 12 December 2022 (UTC)Reply

Damn ! I'm definitely looking forward to a solution as well. Did you try asking the developers of the patch ?
Flow works properly on this wiki and it's 1.40.0. Is there a way to access the code base to see what fix they applied ? Tinss (talk) 16:15, 12 December 2022 (UTC)Reply
I think you can see the configuration of Parsoid for this wiki here https://gerrit.wikimedia.org/g/operations/mediawiki-config/+/fa477a5521e8acc290a02e7cf8f9219ebd2d5cf5/wmf-config/CommonSettings.php#2653. Though, I am not sure whether this can help you. Lens0021 (talk) 04:11, 9 March 2023 (UTC)Reply
I can confirm the same issue, the patch mentioned does not work anymore. Working with version 1.39.1 and not even the REL1_39 on GitHub is working.

@Tinss: Flow works properly on this wiki and it's 1.40.0. Is there a way to access the code base to see what fix they applied ?

It says this MediaWiki instance is running the version 1.40.0-wmf.20. So in theory, the version listed as such on the extension's GitHub is the one featured here. If you happen to find anything, please share here with us, because apparently we can't expect the developers to prioritize the users of MediaWiki as much as they prioritize Wikimedia's projects.
It's been more than 2 years of this issue, still unresolved for most of us, except, well, Wikimedia. Marx.FelipeForte (talk) 08:32, 27 January 2023 (UTC)Reply
Is there a phabricator ticket for the issue ? Maybe we could try kindly asking the VE development team to look into it.
Flow is indeed very popular in enterprise MW. Tinss (talk) 19:06, 27 January 2023 (UTC)Reply
I haven't made tickets for the issue at phabricator. I would appreciate if there will be one. Fokebox (talk) 06:38, 30 January 2023 (UTC)Reply
Since there's a demand for it, I created a ticket for this issue (still unresolved on my end) Marx.FelipeForte (talk) 21:30, 2 February 2023 (UTC)Reply
Thank you! Hope there will be a solution of the issue soon. Fokebox (talk) 14:45, 6 February 2023 (UTC)Reply
We received a reply, more than a month later basically confirming my suspicions related to this extension developers' priorities:

apparently we can't expect the developers to prioritize the users of MediaWiki as much as they prioritize Wikimedia's projects.

This turned out to be true, as can be seen by the comment of this developer on the issue:

I'm afraid we don't offer much in the way of StructuredDiscussions maintenance/support, other than fixing issues that are highly disruptive on Wikimedia wikis. [...]

Also, given that StructuredDiscussions does work on Wikimedia wikis, this seems an issue with the configuration, not the extension; the linked patch is about supporting a zero-config setup, but you probably wouldn't need a patch if it is correctly confiugred.
So what they are saying is – it's the fault of the users, not the developers for not documenting the configuration needed, or for focusing exclusively on Wikimedia projects.
So yeah, we can only rely on the users to fix that. If any of you ever find anything, let us know, I'll certainly do the same. Marx.FelipeForte (talk) 02:47, 9 March 2023 (UTC)Reply
I was sort of expecting that kind of reply. Maybe the original author of the patch (@Lens0021) could lend us a hand ? Tinss (talk) 03:03, 9 March 2023 (UTC)Reply
Unfortunately, I am not using zero-config VisualEditor anymore (or never). I am sorry I've forgotten what was the issue after that patch merged. Here are my current configuration and the comment I've written.
# Disable "zero configuration" VisualEditor
# zero-conf VisualEditor assumes that all the services are served as the same host. ('/' for
# MediaWiki, '/rest.php/<domain>/v3/' for Parsoid and '/restbase/<domain>/v1/' for RESTBase)
# It is not our use case, we are serving those services behind the orchestration tool, Docker or
# Nomad and a variety of addresses are used.
$wgVisualEditorParsoidAutoConfig = false;
$wgVirtualRestConfig = [
	'modules' => [
		'parsoid' => [
			'url' => 'http://' . ( getenv( 'NOMAD_UPSTREAM_ADDR_http' ) ?: 'http:8080' ) . '/rest.php',
		],
		'restbase' => [
			'url' => 'http://' . ( getenv( 'NOMAD_UPSTREAM_ADDR_restbase' ) ?: 'restbase:7231' ),
			# https://github.com/femiwiki/femiwiki/issues/266
			'domain' => 'femiwiki.com',
		],
	],
	'global' => [
		'domain' => 'femiwiki.com',
		'restbaseCompat' => true,
		'forwardCookies' => false,
	],
];
(original code:
https://github.com/femiwiki/docker-mediawiki/blob/408fbdf64fbcbc02c4ca96671f97b40fab7b5701/configs/LocalSettings.php#L357-L380) Lens0021 (talk) 04:01, 9 March 2023 (UTC)Reply
Does anybody resolved the issue or not? Fokebox (talk) 08:24, 23 March 2023 (UTC)Reply
Not on my end. As I do not have MW 1.39 deployed on my test setup, could you give a look at the Parsoid and Flow configs used by Wikimedia for this wiki to see if replicating them fixes the issue ?
It appears that Flow is not finding Parsoid so this points to a configuration issue indeed. Tinss (talk) 00:10, 24 March 2023 (UTC)Reply
will this thread help? Extension talk:StructuredDiscussions/2021#h-flow-Unknown_topic-2021-05-26T02:20:00.000Z Uvas magicas (talk) 05:29, 11 April 2023 (UTC)Reply
This is the patch that used to work but no longer does. Tinss (talk) 21:23, 11 April 2023 (UTC)Reply
No idea how to implement that. For now I am stuck - wanted to update to 1.39.3, but faced with problem. But if I have success, then I want to implement DiscussionTools extension, which, as I understand will be developed. And if I am not mistake Structured discussions are no longer supported, right? Fokebox (talk) 14:12, 11 April 2023 (UTC)Reply
StructuredDiscussions is only getting security fixes. Other type of support has halted. I suspect support will be entirely dropped, but not until there is a migration tool because some wikis (this one at least) are still using StructuredDiscussions.
@Fokebox, did you get a chance to replicate these configs on your installation ? The bug here does seem to be related to the zero-config setup. Tinss (talk) 21:35, 11 April 2023 (UTC)Reply
@Tinss, @Fokebox I don't know if you saw my complete thread, but there, in addition to the patch, is also a summary of the variable:
$wgVirtualRestConfig['modules']['parsoid']['url']
I tried this to connect parsoid php to visualeditor and from visualeditor to flow, it really worked for me, I don't know if you have tried this configuration Uvas magicas (talk) 06:29, 13 April 2023 (UTC)Reply
Well, I decided to drop off the extension as it is not maintained no longer and change it to DuscussionTools. I have not too many Flow pages to be changed, so I decided to resolve the issue this way. Fokebox (talk) 12:51, 13 April 2023 (UTC)Reply
@Fokebox,@Tinss I was finally able to make it work, by the glory of Lenin. Here is what I had to put in the LocalSettings.php:
wfLoadExtension( 'Parsoid', "vendor/wikimedia/parsoid/extension.json" );
$wgVirtualRestConfig['modules']['parsoid'] = [
    'url' => $wgServer . '/rest.php',
];
I followed the instructions of the Parsoid/PHP setup. It recommends to manually declare Parsoid as an extension and to configure it, then just override the url parameter of $wgVirtualRestConfig['modules']['parsoid'] with your situation.
It's where you access the rest.php from. If you input the rest.php location correctly in your url, it should return a JSON catching a 404 error. You should see the same thing as https://en.prolewiki.org/rest.php
The URL of access of the rest.php is what you should put in the url parameter of that configuration. Marx.FelipeForte (talk) 16:03, 8 June 2023 (UTC)Reply
Thanks, but I decided to change the extension to Extension:DiscussionTools Fokebox (talk) 20:01, 9 June 2023 (UTC)Reply
Wow, thanks. Can't wait to try it. Tinss (talk) 05:43, 9 June 2023 (UTC)Reply
@Tinss this might interest you. I still had a problem when doing the above.
The problem was we have a private wiki, so I should also forward cookies:
wfLoadExtension( 'Parsoid', "vendor/wikimedia/parsoid/extension.json" );
$wgVirtualRestConfig['modules']['parsoid'] = [
    'url' => $wgServer . '/rest.php',
    'forwardCookies' => true,
];
But doing only the following also worked for me:
wfLoadExtension( 'Parsoid', "$IP/vendor/wikimedia/parsoid/extension.json" );
(EDITED: Added $IP)
When also applying the patch everybody uses. MeneerWout (talk) 08:31, 15 June 2023 (UTC)Reply
You guys are awesome, I owe you both a virtual beer.
Anyone thinks this should be added to Extension:StructuredDiscussions#Troubleshooting ? Tinss (talk) 01:26, 16 June 2023 (UTC)Reply
Added to the troubleshooting section. Tinss (talk) 04:45, 14 December 2023 (UTC)Reply
In my environment, I had to add $IP/ and follow the code here to get the maintenance script to work. Ryoya3 (talk) 01:14, 28 October 2023 (UTC)Reply