Using MW 1.26.2, the steps that issue unexpected redirect are:
- log out
- attempt to view a page that has manually defined as not accessible without login by extension Lockdown, e.g. $wgNamespacePermissionLockdown[NS_INTERNAL]['read'] = array('user');
- the following works: the login provided by the displayed system message loginreqpagetext (“You need to [log in] to visit the page”) succeeds with returnto=Internal:Page_name. OK
- the following works unexpected: the login link provided on the top right results in returnto=Special:Badtitle not OK
Anything to circumvent this?
- redirecting always via to $wgRedirectOnLogin would be a solution but seems a bit crude