?
avatar RickR2H
RickR2H
14 Jun 2021

Steps to reproduce the issue

The login screen of Joomla 4 generates Javascript errors:

Go yo the login screen and open the console.
Click on the password field.

screen shot 2021-06-14 at 10 03 03

avatar RickR2H RickR2H - open - 14 Jun 2021
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Jun 2021
avatar sandramay0905
sandramay0905 - comment - 14 Jun 2021

Confirm the issue (Firefox, Mac):

image

avatar RickR2H
RickR2H - comment - 14 Jun 2021

Maybe partially related to #34472 ?

avatar joomdonation
joomdonation - comment - 14 Jun 2021

@RickR2H is right. It's related to that PR

@dgrammatiko It's related to this code block https://github.com/joomla/joomla-cms/blob/4.0-dev/build/media_source/system/js/fields/validate.es6.js#L119-L125

message is null, and it causes the error. Could you please fix it? My dirty fix would be changing that block of code to:

if (empty && empty === 'checkbox') {
elMsg.innerHTML = (message !== null && Joomla.sanitizeHtml(message)) || Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_REQUIRED_CHECK'));
} else if (empty && empty === 'value') {
elMsg.innerHTML = (message !== null && Joomla.sanitizeHtml(message)) || Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_REQUIRED_VALUE'));
} else {
elMsg.innerHTML = (message !== null && Joomla.sanitizeHtml(message)) || Joomla.sanitizeHtml(Joomla.Text._('JLIB_FORM_FIELD_INVALID_VALUE'));
}

But you understand it better and could provide better fix.

avatar dgrammatiko
dgrammatiko - comment - 14 Jun 2021

@joomdonation your code is fine, my bad

avatar joomdonation joomdonation - change - 14 Jun 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-06-14 11:20:19
Closed_By joomdonation
avatar joomdonation joomdonation - close - 14 Jun 2021
avatar joomdonation
joomdonation - comment - 14 Jun 2021

Thanks @dgrammatiko . I opened PR #34513 to solve this issue.

Add a Comment

Login with GitHub to post a comment