HTML Form section taking wrong name
Closed, ResolvedPublic

Description

The sections being used in privacy.php should be taking the names called in the i18n file, but instead are just taking the name Admin Panel. See attached image.

Details

Commits
Restricted Diffusion Commit
Restricted Diffusion Commit
CJC created this task.Jul 31 2016, 12:40 PM
CJC added a commit: Restricted Diffusion Commit.
ddixit triaged this task as Low priority.Jul 31 2016, 2:40 PM

Wasn't an issue when using extends specialPage, only became an issue on extends FormSpecialPage.

jack added a comment.Jul 31 2016, 2:54 PM

Using the uselang=qqx URL parameter on Special:AdminPanel/privacy I was able to figure out that the page expects the message keys to be adminpanel/privacy-privacy-section-editing and adminpanel/privacy-privacy-section-viewing (sic!), most likely because the special page is named AdminPanel/privacy in the constructor.

FormSpecialPage has a (protected) function called getMessagePrefix(), which by default returns strtolower( $this->getName() ). You should be able to override this to return adminpanel-privacy or something similar, saner; something which doesn't include the slash in its name.

CJC closed this task as Resolved.Jul 31 2016, 7:47 PM
CJC claimed this task.

Fixed in R20:14. Thanks Jack :)

CJC added a commit: Restricted Diffusion Commit.Aug 1 2016, 7:59 PM