Page MenuHomePhabricator

Raw message key ⧼jsonconfig-blocked-page-creation⧽ shown in Permission Error message
Closed, DuplicatePublicBUG REPORT

Description

When trying to create a page in Data namespace (with and without ".json$" ending (matching the pattern or not) then shows:

Permission error

You do not have permission to create this page, for the following reason:

⧼jsonconfig-blocked-page-creation⧽

Note that the "⧼jsonconfig-blocked-page-creation⧽" appears to not have any i18n language to represent the message key.

./includes/JCSingleton.php:                     $result = 'jsonconfig-blocked-page-creation';

but if I remove the line:

$wgJsonConfigModels['json'] = null;

then the edit page works fine.

Also see https://codesearch.wmcloud.org/search/?q=jsonconfig-blocked-page-creation&i=nope&files=&excludeFiles=&repos=

Originally mentioned in https://phabricator.wikimedia.org/T307978 (see original post for configuration and additional context)

Event Timeline

Aklapper renamed this task from [JsonConfig Extension] Permission error You do not have permission to create this page, for the following reason: ⧼jsonconfig-blocked-page-creation⧽ to Raaw message key ⧼jsonconfig-blocked-page-creation⧽ shown in Permission Error message.May 11 2022, 9:31 AM
Aklapper renamed this task from Raaw message key ⧼jsonconfig-blocked-page-creation⧽ shown in Permission Error message to Raw message key ⧼jsonconfig-blocked-page-creation⧽ shown in Permission Error message.

https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/JsonConfig/+/refs/heads/master/i18n/qqq.json#56

	"jsonconfig-optional-field": "A short suffix appended to one of these messages to indicate that the field is optional.\n* {{msg-mw|Jsonconfig-err-bool}}\n* {{msg-mw|Jsonconfig-err-string}}\n* {{msg-mw|Jsonconfig-err-integer}}\n* Or any other field error message provided by another extension\n{{Identical|Optional}}",

Are these defined? (case-sensitive?)

  • Jsonconfig-err-bool
  • Jsonconfig-err-string
  • Jsonconfig-err-integer
thiemowmde added subscribers: tchin, Pchelolo, thiemowmde.

The responsible code was added via T285805 by @tchin. But the message was never added to en.json, it seems.

Are these defined? (case-sensitive?)

As far as I can see these messages exist. If the first character is upper or lowercase doesn't make a difference in most contexts.

Pppery subscribed.

You would think I, of all people, would know better than to file a duplicate task. But as usual everything's an unkempt mess. Sigh.