-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.2] Correct display of user profile #45107
base: 5.2-dev
Are you sure you want to change the base?
Conversation
I have tested this item ✅ successfully on 8287cc7 Before Pull RequestAfter Pull RequestUsing This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45107. |
I have tested this item ✅ successfully on 8287cc7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45107. |
rtc This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45107. |
try { | ||
echo HTMLHelper::_('users.' . $key, $field->value); | ||
break; | ||
} catch (\InvalidArgumentException $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTMLHelper::_
throws InvalidArgumentException at a few places, so here you catch all of them, not only the one you want to catch. So you will hide other errors, too, with that code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better if I revert this part and manually register the function with HTMLHelper before it is called?
try { | ||
echo HTMLHelper::_('users.' . $key, $field->value); | ||
break; | ||
} catch (\InvalidArgumentException $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as my previous comment.
Adding the "RMDQ" (release managers decision queue) label as I have some doubts if this fix is good as it is. |
Hello @AkameOuO |
Back to pending due to requested changes. See previous comment. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45107. |
It still needs other patches for fixing the issue if reverting changes to tmpl files. I will try the method in this comment #45107 (comment). before ec40c91: after ec40c91: |
Pull Request for Issue #45079 .
Summary of Changes
It tries to check if keys are registered in HTMLHelper. But keys are not registered until the first call to HTMLHelper::(). Therefore, I call HTMLHelper::() without checking if keys are registered and use a catch block when the key is invalid.
And add two methods in
Joomla\Component\Users\Administrator\Service\HTML\Users
for colorScheme and allowTourAutoStart.Testing Instructions
Reproduce the steps as described in the original issue.
Actual result BEFORE applying this Pull Request
Display raw values from database.

Expected result AFTER applying this Pull Request
Display sanitized texts.

Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed