Page MenuHomePhabricator

PLURAL magicword not parsed during installation: "Password must be at least {{PLURAL:10|1 character|10 characters}}"
Closed, ResolvedPublic

Description

During installation of Mediawiki, after database settings, the installer asks for username, passwords and some other things not relevant here.

In the password field, input a password with less than 10 characters (less than required).

This will generates an error message:

Expected

The error messages says
Password must be at least 10 characters.

Actual

It's rendered literally
Password must be at least {{PLURAL:10|1 character|10 characters}}

Event Timeline

Aklapper renamed this task from PLURAL magicword not parsed during installation to PLURAL magicword not parsed during installation: "Password must be at least {{PLURAL:10|1 character|10 characters}}".Nov 16 2019, 12:53 PM
Aklapper added a project: MediaWiki-Installer.

I was able to reproduce this on 1.34. I wonder if the root cause is similar to T241638, translation service not being yet available during the installer.

While the impact of this bug is limited, it looks bad, as on installation it looks as the software is unreliable/has bad QA, despite probably just being unnoticed because power users do not use the web installer/not installing it frequently.

From https://www.mediawiki.org/wiki/Manual:Messages_API#Notes_about_gender,_grammar,_plural

You must use text, escaped, parse or parseAsBlock output formats for them to work.

I suspect as this is a generic error message that is bubbled up from MW itself... It's just not transformed correctly during the output

	"passwordpolicies-policy-minimalpasswordlength": "Password must be at least $1 {{PLURAL:$1|character|characters}} long",

But that doesn't match the format of {{PLURAL:10|1 character|10 characters}} shown in the output... Or is that just something that the MW layers do as part of transforming the output?

@Reedy I do think it's related to MediaWiki Parser. See T238633 which is a dup of this issue, but shows that bullet points are not parsed as wikitext correctly.

@Reedy I do think it's related to MediaWiki Parser. See T238633 which is a dup of this issue, but shows that bullet points are not parsed as wikitext correctly.

Most likely the parser being called incorrectly (or not called at all), rather than a bug in the parser itself. Which is not a parser bug

Gotcha. Yes, I agree with your diagnosis.

Change 571007 had a related patch set uploaded (by Tobi 406; owner: Tobi 406):
[mediawiki/core@master] installer: Parse error message

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

Boldly adding Platform Engineering as this patch has not seen a review for a week.

Change 571007 merged by jenkins-bot:
[mediawiki/core@master] installer: Parse error message

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