Page MenuHomePhorge

HTML Form section taking wrong name
Closed, ResolvedPublic

Assigned To
Authored By
CJC
Jul 31 2016, 12:40 PM
Tags
  • Restricted Project
Referenced Files
F375: pasted_file
Jul 31 2016, 12:40 PM

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.

pasted_file (406×803 px, 28 KB)

Revisions and Commits

Event Timeline

CJC added a commit: Restricted Diffusion Commit.

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

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 claimed this task.

Fixed in R20:14. Thanks Jack :)

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