Skip to content

Commit 4810a1e

Browse files
committed
Configure Flow (Structured Discussions) for MW 1.39 Fixes Issue #114
Visual Editor was not working properly for Flow boards on MW1.39 (Parsoid-PHP) The easily provoked error was: "Exception caught: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion" In MW 1.39, Flow still ignores the zero-config setup of Parsoid-PHP. So, we need to wfLoadExtension() the local vendored Parsoid library. And, set $wgVirtualRestConfig This makes Flow usable on MW 1.39, but ultimately, Flow needs to be replaced as described in issue #39
1 parent 6d27f55 commit 4810a1e

File tree

Image for: File tree

1 file changed

Image for: 1 file changed
+24
-3
lines changed

1 file changed

Image for: 1 file changed
+24
-3
lines changed

‎config/MezaCoreExtensions.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ list:
125125
version: ~4.5
126126
config: |
127127
wfLoadExtension( 'Bootstrap' );
128-
// Bootstrap modules are loaded in 'override.php'
128+
# Bootstrap modules are loaded in 'override.php'
129129
130130
# Adds Tooltips, Cards, Carousel etc.
131131
- name: BootstrapComponents
@@ -463,12 +463,33 @@ list:
463463
version: "{{ mediawiki_default_branch }}"
464464
composer_merge: true
465465
config: |
466+
# Set the default content format for Flow
466467
$wgFlowContentFormat = 'html';
468+
469+
# Permit at least one "group" to create Flow boards
470+
$wgGroupPermissions['user']['flow-create-board'] = true;
471+
472+
# Configure Content Model for namespaces using Flow
467473
$wgNamespaceContentModels[NS_TALK] = 'flow-board';
468-
$wgNamespacesWithSubpages[NS_TALK] = true;
469474
$wgNamespaceContentModels[NS_USER_TALK] = 'flow-board';
475+
# Configure "subpages" feature for the same namespaces
476+
$wgNamespacesWithSubpages[NS_TALK] = true;
470477
$wgNamespacesWithSubpages[NS_USER_TALK] = true;
471-
$wgGroupPermissions['user']['flow-create-board'] = true;
478+
479+
# Flow needs Parsoid if using VE, and with MW 1.39 Flow still ignores zero-config Parsoid
480+
wfLoadExtension( 'Parsoid', "$IP/vendor/wikimedia/parsoid/extension.json" );
481+
# Flow ignores RESTBase, but we did not test or document this setting
482+
# $wmgUseRestbaseVRS= false;
483+
484+
$wgVirtualRestConfig['modules']['parsoid'] = [
485+
'url' => "http://localhost:8080/$wikiId/rest.php",
486+
# server and port variables would be better here, but other Meza roles are not yet ready
487+
# 'url' => "$wgServer/$wikiId/rest.php",
488+
# 'domain' => $wikiId,
489+
'prefix' => $wikiId,
490+
# Forward cookies is dangerous for non-private wikis
491+
# 'forwardCookies' => true
492+
];
472493
473494
# CommentStreams - Adds a commenting system for wikis.
474495
- name: CommentStreams

0 commit comments

Image for: 0 commit comments
Comments
 (0)