Install Joomla 4.0-dev with sample data
Enable User Registration
Enable Lang debug (for testing)
On frontend click "Create an account"
Dont complete the form
Click Register button
See red error message
Note that "error" is lowercase and not translatable
**Error**
error
safari on mac
Labels |
Added:
?
|
I can partly solve this by using in validate.js
} else {
message = Joomla.JText._('JLIB_FORM_CONTAINS_INVALID_FIELDS');
}
error = {
[Joomla.JText._('ERROR')]: [message] // INSTEAD of error:[message]
};
Joomla.renderMessages(error);
}
and adding
Text::script('ERROR');
in FormvalidateAssetItem.php
method public function onAttachCallback(Document $doc)
public function onAttachCallback(Document $doc)
{
// Add validate.js language strings
Text::script('JLIB_FORM_CONTAINS_INVALID_FIELDS');
Text::script('JLIB_FORM_FIELD_REQUIRED_VALUE');
Text::script('JLIB_FORM_FIELD_REQUIRED_CHECK');
Text::script('JLIB_FORM_FIELD_INVALID_VALUE');
Text::script('ERROR');
}
But I get the info
blue color which is the default...
This issue may not only exists for this specific error, but for all js trigered errors as far as I could see.
@infograf768 its easier than that
Just add the following to the registration form etc
// Load JavaScript message titles
Text::script('ERROR');
Text::script('WARNING');
Text::script('NOTICE');
Text::script('MESSAGE');
You are correct. Now remains to find out where it also has to be added.
Why not add these in the template index.php so to not bother anymore. That is what we do for installation.
will do patch in index.php
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-06 08:45:11 |
Closed_By | ⇒ | infograf768 |
same on the forgotten password page and forgotten username page