Page MenuHomePhabricator

Cannot properly setup StructuredDiscussions via mwcli
Closed, ResolvedPublicBUG REPORT


List of steps to reproduce (step by step, including full links if applicable):

  • Install mwcli.
  • Set up all containers. ( mw dev mediawiki create && mw dev mysql create)
  • Clone or download StructuredDiscussion in the 'extensions' directory.
  • (If LocalSettings.php exists, then) Append wfLoadExtension( 'Flow' ); to it.
  • Install MediaWiki by executing mw dev mediawiki install --dbtype mysql. (Flow does not support sqlite)
  • (If LocalSettings.php did not exist, then) Append wfLoadExtension( 'Flow' ); to it and rerun update.php.
  • Append $wgNamespaceContentModels[NS_TALK] = 'flow-board'; to the LocalSettings.php.
  • Visit http://default.mediawiki.mwdd.localhost:8080/w/index.php?title=Talk:Main_Page

What happens?:

A PHP warning displays.

Warning: fopen(/var/www/html/w/images/docker/default/tmp/mw-GlobalIdGenerator-UID-88): failed to open stream: No such file or directory in /var/www/html/w/includes/libs/uuid/GlobalIdGenerator.php on line 437

The directory the path indicates doesn't seem to be exist.

$ mwdev dev mediawiki exec ls /var/www/html/w/images/docker/default

What should have happened instead?:

An empty Flow board should have been shown when visiting the talk page.

Software version:

Other information, etc:
The document on says:

You must run "update.php" as the web server user (depends on configuration, but could be e.g. www-data). Otherwise, it can leave temporary /tmp/mw-UIDGeneratorUUID-UID-xx files that MediaWiki may be unable to open (task T55791). If you get a "Permission denied" error upon first visiting a Flow board you have to delete these files. Also, update.php will create {{FlowMention}} to support Flow's mention feature in VE (either @ or a toolbar menu provides a convenient auto-complete interface for mentions).

Event Timeline

I can reproduce!
Thanks for the instructions

image.png (522×2 px, 173 KB)

I have no name!@mediawiki:/var/www/html/w$ ls -lahr /var/www/html/w/images/docker/default/tmp
ls: cannot access '/var/www/html/w/images/docker/default/tmp': No such file or directory

The directory that flow is trying to use does not exist.

But mwcli does set this as the tmp dir that should be used

$wgUploadDirectory = "{$IP}/images/docker/{$dockerDb}";
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";

The images directory is a docker volume, but we don't create any directories in it right now.

We can either:

  • Turn all of these kinds of directories into docker volumes out of the box, thus they will all be created
  • After the volume is created, do an mkdir..

It looks like we probably dont need to set the tmpdirectory, as when unset mediawiki will ultimately use which should be fine.
I'll give it a go

Addshore moved this task from Backlog to In Progress on the mwcli board.

Will be in the next release