Page MenuHomePhabricator

ConfirmAccount does not show "Request account" link in top-right corner when read-only in MW 1.35
Open, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce:

  • Install ConfirmAccount on MW 1.35
  • Set $wgGroupPermissions['*']['createaccount'] = false; and $wgGroupPermissions['*']['read'] = false;.
  • Set $wgWhitelistRead[] = 'Special:RequestAccount';.
  • Go to your wiki while logged out

What happens?:

There is no "Request account" link at the top when the user is not logged in.

What should have happened instead?:

There should be a "Request account" link at the top right corner of the page when the user is not logged in.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc: MediaWiki 1.35.2

Fix: Good news, I already have a fix. Please see https://github.com/mywikis/ConfirmAccount/blob/master/includes/frontend/ConfirmAccountUI.hooks.php#L32. isset( $personal_urls['login'] ) is changed to !isset( $personal_urls['logout'] ), which seems like the same thing, but is more accurate in this case and makes it work again as intended. I want to verify that this is a good way to address this problem.

Event Timeline

Actually, this was already fixed. Was looking at an out-of-date version of the code, my apologies. https://github.com/wikimedia/mediawiki-extensions-ConfirmAccount/blob/master/includes/frontend/ConfirmAccountUI.hooks.php#L31

But why did it change to login-private? And shouldn't !logout be a more general version that will more so stand the test of time?