When enabling two-factor authentication, the QR code which is scanned for enrollment occasionally does not render. There appears to be in issue with the client-side code used to draw the code. This is confusing for users who are new to the use of Google Authenticator and other such tools as part of their authentication flow.
Here are reproduction steps that seem to work fairly consistently. They require that you not already have two-factor enabled for the account used for testing.
# Clear your browser cache.
# Login to https://en.wikipedia.org
# Click "Preferences"
# Click "Enable two-factor authentication"
# Observe that the QR code is displayed
# Click "Preferences"
# Click "Enable two-factor authentication"
# Observe that the QR code is not displayed
# Shift-Refresh the page
# Observe that the QR code is displayed
# Click "Preferences"
# Click "Enable two-factor authentication"
# Observe that the QR code is not displayed
# Click "Preferences"
# Click "Enable two-factor authentication"
# Observe that the QR code is not displayed
# Click "Preferences"
# Click "Enable two-factor authentication"
# Observe that the QR code is not displayed
So, my hypothesis is that this is a timing issue and has to do with loading from browser cache. It seems that the QR code is not rendered when the JavaScript need is available in local cache. Maybe. Sometimes it does render when loading from local cache. so I'm not certain.