Page MenuHomePhabricator

Improve message when there is no config file, and thus no file can be moved
Closed, ResolvedPublic1 Estimated Story Points

Description

Step 1: understand/review what the current help message says and what kind of support it provides
Step 2: improve it to help people understand what they need to do in order to be able to import a file from their wiki using FileImporter

For step 2: Update the error message as follows:
"Unfortunately, importing files from the source wiki ($1) is not yet possible because there is no configuration for the wiki at $2. For information about setting up a configuration file for the wiki, review FileImporter's [configuration file documentation page | ($3)]."

The parameters should be filled with:
($1) host name of the source wiki (e.g. "en.wikipedia.org") i.e. no change to current behaviour
($2) https://www.mediawiki.org/wiki/Extension:FileImporter/Data i.e. no change to current behaviour
($3) https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/Move_files_to_Commons/Configuration_file_documentation (new embedded link under "configuration file documentation page")

In addition, we thought it would be useful to update the warning message at the top of https://www.mediawiki.org/wiki/Extension:FileImporter/Data to say the following:
"In order to import files from a wiki, a configuration file must be set up as a subpage of this page and be listed below. Changing any subpage will change the behavior of FileImporter handling specific files. For information on these configuration file subpages, please visit the [documentation page | ($3)]. Please also note that when adding a subpage, the title should follow domain name minus ".org", for example, the one for Dutch Wikipedia should use "nl.wikipedia"."

Event Timeline

Lena_WMDE set the point value for this task to 1.

fileimporter-commonshelper-missing-config: "Importing files from the source wiki ($1) is not yet possible. There is no configuration for the wiki at $2."

The two parameters are filled with the host name of the source wiki (e.g. "en.wikipedia.org") and the URL https://www.mediawiki.org/wiki/Extension:FileImporter/Data.

The message was introduced via T199108: Block all imports if no configuration file for a source wiki exists in patch https://gerrit.wikimedia.org/r/475091. Patch https://gerrit.wikimedia.org/r/477305 introduced a $wgFileImporterCommonsHelperHelpPage setting for the URL just a few days later.

@Lena_WMDE, unfortunately there are no acceptance criteria here, not even a problem description. "Check" for what?

Related: T248296: Investigation: Discuss fallback mechanisms for missing config pages

Thanks, Thiemo! Could you explain what this means:

Patch https://gerrit.wikimedia.org/r/477305 introduced a $wgFileImporterCommonsHelperHelpPage setting for the URL just a few days later.

What did this change?

The idea of this ticket is 1) to understand/review what the current help message looks like, 2) improve it to help people understand what they need to do in order to be able to import a file from their wiki.

In the case of the current help message you posted above:

fileimporter-commonshelper-missing-config: "Importing files from the source wiki ($1) is not yet possible. There is no configuration for the wiki at $2." The two parameters are filled with the host name of the source wiki (e.g. "en.wikipedia.org") and the URL https://www.mediawiki.org/wiki/Extension:FileImporter/Data.

I would say this is maybe not enough help. Is there a help page for how to set up a configuration page for FileImporter? I can find only this meta page that explains how the configuration file works and there is a little bit of information the warning text on the config file page. Once I know if there are any more help pages, I can provide a suggestion here for how to improve the message and/or pages.

Lena_WMDE renamed this task from Check on message when there is no config file, and thus no file can be moved to Improve message when there is no config file, and thus no file can be moved.Jun 24 2020, 8:58 AM
Lena_WMDE updated the task description. (Show Details)

The $wgFileImporterCommonsHelperHelpPage setting allows us to easily change the https://www.mediawiki.org/wiki/Extension:FileImporter/Data URL when we need to.

At the top of https://www.mediawiki.org/wiki/Extension:FileImporter/Data is a link to the documentation page you mentioned. That's what we have at the moment. Back then we tried to not duplicate to much information that is hard to change, e.g. because it is hard-coded in a message in our codebase. Instead we point to the documentation page everybody is free to update.

What people typically do is copy-paste an existing config page as a blueprint for a missing one. This is also what I recommend. There are bits of "self-documentation" in these pages. We could update these as well, if needed.

Here is a live example: https://commons.wikimedia.org/wiki/Special:ImportFile?clientUrl=https://ca.wikipedia.org/wiki/Fitxer:Junts_per_Ribesalbes.png. Sure, there is a lot of room for improvement. It can even be a long bullet point list, similar to the introduction we wrote for Two-Column-Edit-Conflict-Merge. It could even show an empty example configuration to copy-paste. I'm not sure if this is the best idea, but it's possible.

Thanks, Thiemo, for the explanation! I reviewed this with Elisha and Adam and I would propose to update the message as follows:

"Unfortunately, importing files from the source wiki ($1) is not yet possible because there is no configuration for the wiki at $2. For information about setting up a configuration file for the wiki, review FileImporter's [configuration file documentation page | ($3)]."

The parameters should be filled with:
($1) host name of the source wiki (e.g. "en.wikipedia.org") i.e. no change to current behaviour
($2) https://www.mediawiki.org/wiki/Extension:FileImporter/Data i.e. no change to current behaviour
($3) https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/Move_files_to_Commons/Configuration_file_documentation (new embedded link under "configuration file documentation page")

In addition, we thought it would be useful to update the warning message at the top of https://www.mediawiki.org/wiki/Extension:FileImporter/Data to say the following:
"In order to import files from a wiki, a configuration file must be set up as a subpage of this page and be listed below. Changing any subpage will change the behavior of FileImporter handling specific files. For information on these configuration file subpages, please visit the [documentation page | ($3)]. Please also note that when adding a subpage, the title should follow domain name minus ".org", for example, the one for Dutch Wikipedia should use "nl.wikipedia"."

Please let me know if there is anything that is technically/terminologically incorrect.

I like this proposed message change, it's a great next step.

Also, I'm curious about why the "$1" link survived. Not a blocker, but it seems like unnecessary clutter.

The $1 parameter is not a link, but the name of the source wiki. I feel the user needs to know this to be able to create a config page with this name.

Yes I agree with you @thiemowmde. That's the reason Elisha and I thought it was important to keep it in the end - it provides additional information for the process of setting up a config file.

Change 608559 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] Update missing-config message

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/FileImporter/ /608559

Change 608559 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Update missing-config message

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/FileImporter/ /608559

Just took a look and think it's a bit strange to have the full url: https://commons.wikimedia.beta.wmflabs.org/wiki/Extension:FileImporter/Data
(also is it a different link because it's on beta?)

I think it might be better if replaced with more descriptive words, maybe "in this list" and removing "at"?

Change 610698 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] Update missing-config message (part 2)

https://gerrit.wikimedia.org/r/610698

I propose replacing the URL with a slightly more meaningful text to provide a hint about what will be found upon clicking it:

"Unfortunately, importing files from the source wiki ($1) is not yet possible because there is no configuration for the wiki in the [configuration file list | $2]. For information about setting up a configuration file for the wiki, review FileImporter's [configuration file documentation page | ($3)]."

The parameters should be filled with:
($1) host name of the source wiki (e.g. "en.wikipedia.org") i.e. no change to current behaviour
($2) https://www.mediawiki.org/wiki/Extension:FileImporter/List_of_configured_wikis i.e. embedded link to updated page name under "configuration file list"
($3) https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/Move_files_to_Commons/Configuration_file_documentation (new embedded link under "configuration file documentation page")

I propose replacing the URL with a slightly more meaningful text to provide a hint about what will be found upon clicking it:

Thanks, I've made changes. The only difference was to change the wording of the "configuration file list" link.

Change 610698 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Update missing-config message (part 2)

https://gerrit.wikimedia.org/r/610698

Lena_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2020-06-24 board.
Lena_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2020-07-08 board.