No Code Attached Yet
avatar jschmi102
jschmi102
1 Aug 2023

Steps to reproduce the issue

call user login using WebAuthn Interface (WebAuthentication Button)

  1. try userid configured for WebAuthn
  2. try usreid w/o WebAuthn

Expected result

  1. successfull login
  2. login fails and failure message is displayed

Actual result

  1. successfull login
    2, login fails and got javascript error "TypeError: Joomla.renderMessages is not a function"
    (causer: media/plg_system_webauthn/js/login.js)

System information (as much as possible)

Joomla v4.3.3
php v.8.0

Additional comments

If I do a succesful login/logoff and then try to cause a failed login (case 2.) then failure message is displayed correctly. If reloading page after successful login/logoff, error wil happen again.
I've tried to locate lib for function "renderMessages" to fix problem but could not find script.
Any idea what goes wrong?

avatar jschmi102 jschmi102 - open - 1 Aug 2023
avatar joomla-cms-bot joomla-cms-bot - change - 1 Aug 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Aug 2023
avatar Fedik Fedik - change - 1 Aug 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-08-01 15:15:32
Closed_By Fedik
avatar Fedik Fedik - close - 1 Aug 2023
avatar Fedik
Fedik - comment - 1 Aug 2023

Please test #41300 the fix. Thank you.

avatar jschmi102 jschmi102 - change - 1 Aug 2023
The description was changed
avatar jschmi102 jschmi102 - edited - 1 Aug 2023
avatar jschmi102
jschmi102 - comment - 1 Aug 2023

after installing #41300 Iget
`Uncaught TypeError: e is null
removeMessages https://localhost/myjoomla4/media/system/js/messages.min.js?7425e8d1cb9e4f061d5e30271d6d99b085344117:1
renderMessages https://localhost/myjoomla4/media/system/js/messages.min.js?7425e8d1cb9e4f061d5e30271d6d99b085344117:1
plgSystemWebauthnLogin https://localhost/myjoomla4/media/plg_system_webauthn/js/login.min.js?d1ff3cc9bf1eec53c199a743e4155462:1
https://localhost/myjoomla4/media/plg_system_webauthn/js/login.min.js?d1ff3cc9bf1eec53c199a743e4155462:1

Same behavior:
If I do a succesful login/logoff and then try to cause a failed login (case 2.) then failure message is displayed correctly. If reloading page after successful login/logoff, error wil happen again.

`

avatar Fedik
Fedik - comment - 1 Aug 2023

That something different, it not "TypeError: Joomla.renderMessages is not a function" anymore.

Please enabled debug, and post the error trace again.

avatar heelc29
heelc29 - comment - 1 Aug 2023

I can't replicate (Win10; Edge V115.0.1901.188)

avatar jschmi102
jschmi102 - comment - 2 Aug 2023

hi,
did checks on Joomla 4.3.3. Added "media/system/js/messages.js" to default.php of mod-login. This produced falure:
Uncaught TypeError: messageContainer is null removeMessages https://localhost/media/system/js/messages.js?2dce42a59768e9427f2241dd04344029:306 renderMessages https://localhost/media/system/js/messages.js?2dce42a59768e9427f2241dd04344029:253 plgSystemWebauthnLogin https://localhost/media/plg_system_webauthn/js/login.js?2dce42a59768e9427f2241dd04344029:181 <anonymous> https://localhost/media/plg_system_webauthn/js/login.js?2dce42a59768e9427f2241dd04344029:230 EventListener.handleEvent* https://localhost/media/plg_system_webauthn/js/login.js?2dce42a59768e9427f2241dd04344029:227 <anonymous> https://localhost/media/plg_system_webauthn/js/login.js?2dce42a59768e9427f2241dd04344029:226 <anonymous> https://localhost/media/plg_system_webauthn/js/login.js?2dce42a59768e9427f2241dd04344029:234

#41300 is having same error "Uncaught TypeError: messageContainer is null" using "media/system/js/messages.js" instead of ""media/system/js/messages.min.js""

I think, there may be a problem with DOM or event-handling, as if I do a successful login/logoff and then try to cause a failed login then system behaves correctly. Using a fresh/new page system does wrong.

avatar jschmi102
jschmi102 - comment - 2 Aug 2023

hi,
may be this might help to fix it:
if you provide a div-element "<div id="system-message-container"></div>" e.g. in default.php of mod-login then the system behaves correctly (will show the error message).

avatar Fedik
Fedik - comment - 2 Aug 2023

if you provide a div-element <div id="system-message-container"></div>

Then it sound like a bug in your template.
Because this element should be always available.

avatar jschmi102
jschmi102 - comment - 2 Aug 2023

OK! Will fix this and report bug to developer of template.
Adding lib "media/system/js/messages.js" or using #41300 fixes #41299 - many thanks for your help!

avatar jschmi102
jschmi102 - comment - 14 Sep 2023

hi,
I found that after installation of joomla 4.3.4 problem reocurred.
I get javascript error " e.renderMessages is not a function"

I had to change/add script in default.php of mod_login:
->registerAndUseScript('messages', 'media/system/js/messages.js');

avatar Fedik
Fedik - comment - 14 Sep 2023

Please test the fix, then it will be in one of furture version #41300

if the fix works for you, go to https://issues.joomla.org/tracker/joomla-cms/41300
And click this button:
Screenshot 2023-09-14_11-40-26

avatar jschmi102
jschmi102 - comment - 14 Sep 2023

hi,
tested fix - it works! - thank you!

Add a Comment

Login with GitHub to post a comment