No Code Attached Yet bug
avatar dautrich
dautrich
31 Mar 2023

Steps to reproduce the issue

  • Create a user account with MFA (TOTP) active.
  • Login to the frontend with this account with username and password.
  • A form is displayed to enter the TOTP code.

Expected result

The cursor should sit in the input field.

Actual result

The cursor does not sit in the input field and must be placed there manually.
SKYLAR_J4_MFA

System information (as much as possible)

Joomla 4.2.9 / PHP 8.1 / MySQL 8.0
Tested with Cassiopeia and SKYLAR_J4 (from Joomla51): Identical behavior

Additional comments

When logging in to the backend, the cursor correctly sits in the input field
Atum_MFA

avatar dautrich dautrich - open - 31 Mar 2023
avatar joomla-cms-bot joomla-cms-bot - change - 31 Mar 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Mar 2023
avatar chmst
chmst - comment - 2 Apr 2023

Do you have the same effect when you switch your template to cassiopeia defalt view?

avatar dautrich
dautrich - comment - 3 Apr 2023

Yes, as mentioned above under "System Information":
"Tested with Cassiopeia and SKYLAR_J4 (from Joomla51): Identical behavior"

At first, I suspected the template as well and submitted a post to the Joomla51 forum. But Ciaran Walsh asked me to test with Cassiopeia as well, what I did. The test revealed that the issue is not template-dependent.

avatar richard67
richard67 - comment - 4 Apr 2023

I can reproduce the issue on the current 4.3-dev branch with Cassiopeia as site template.

avatar richard67 richard67 - change - 4 Apr 2023
Labels Added: bug
avatar richard67 richard67 - labeled - 4 Apr 2023
avatar richard67
richard67 - comment - 4 Apr 2023

It seems that this script which is loaded on the captive login page of the multi factor authentication on both backend and frontend login does not work in the frontend: https://github.com/joomla/joomla-cms/blob/4.3-dev/build/media_source/com_users/js/two-factor-focus.es6.js .

The ID of the field for the verification code is right in both views.

But in frontend, there is a javascript error "Uncaught TypeError: document.getElementById(...) is null" in the browser console on the frontend page but not on the backend page.

The error happens here: https://github.com/joomla/joomla-cms/blob/4.3-dev/build/media_source/com_users/js/two-factor-focus.es6.js#L12

avatar richard67
richard67 - comment - 4 Apr 2023

I have found the mistake and will provide a fix soon.

avatar richard67 richard67 - close - 4 Apr 2023
avatar richard67
richard67 - comment - 4 Apr 2023

Closing as having a pull request. Please test #40330 . Thanks in advance.

avatar richard67 richard67 - change - 4 Apr 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-04-04 12:27:45
Closed_By richard67

Add a Comment

Login with GitHub to post a comment