User tests: Successful: Unsuccessful:
If a user makes no changes to his profile and tries to click on Save
or Save & Close
button, an ERROR Message pops up.
USE PHP 8
User Menu
option at the top-right.Edit Account
optionSave
or Save & Close
buttons.error message pops up
NO ERROR MESSAGE POPS NOW
System/Plugins
'Auth'
> Two Factor Authentication - YubiKey
> Two Factor Authentication - Google Authenticator
No
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_admin Layout |
@himanshu007-creator Could you switch on "Debug System" and set "Error Reporting" to "Maximum" in Global Configuration in backend? This should then tell you where the error happens. Maybe it should be fixed at that place instead of like you propose it with this PR?
i changed these files
I have tested this item
I have tested the patch
before applying the patch error was coming after applying it there was no error.
@himanshu007-creator Your fix is wrong. From my quick look, you can change this line of code https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_users/src/Model/UserModel.php#L260 to one of the two options below:
if (array_key_exists('twofactor', $data) && is_array($data['twofactor']))
OR
if (isset($data['twofactor']['method']))
And the issue should be sorted.
@himanshu007-creator Your fix is wrong. From my quick look, you can change this line of code https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_users/src/Model/UserModel.php#L260 to one of the two options below:
if (array_key_exists('twofactor', $data) && is_array($data['twofactor']))
OR
if (isset($data['twofactor']['method']))
And the issue should be sorted.
yes! @joomdonation sir, it worked out!. So should i make changes now in my PR as asked ?
The fix is not wrong, it fixes a broken behaviour in handling automated fieldset rendering in Joomla!, where the given ignore variable is ignored...
If no 2fa is activated, nothing should be send to the server, that's why the hidden field should not be rendered. Therefor the fix.
Additional one could also fix the if
. But the changes here have to be there for sure.
@himanshu007-creator could you additional add the 2nd suggestion from @joomdonation to your PR (just make the change in the same branch and push)
@himanshu007-creator could you additional add the 2nd suggestion from @joomdonation to your PR (just make the change in the same branch and push)
Sure! , working on it.
Labels |
Added:
?
|
Category | Administration com_admin Layout | ⇒ | Administration com_admin com_users Layout |
I have tested this item
Tested successfully in Beta8-dev of 3 March using Wampserver 3.2.4 and PHP 8.0.2.
I have tested this item
Tested successfully using PHP 8.0.0 and Joomla! 4.0.0-beta8-dev Development(Joomla version).
Status | Pending | ⇒ | Ready to Commit |
RTC
Something seems weird here. We should be allowing users to change their 2FA settings in the com_admin view. This fixes the issue by not showing/allowing modification of the 2FA settings.
Something seems weird here. We should be allowing users to change their 2FA settings in the com_admin view. This fixes the issue by not showing/allowing modification of the 2FA settings.
@wilsonge Not sure about that. I've applied the patch here and still can change my 2FA settings in com_users. Or am I missing something?
Status | Ready to Commit | ⇒ | Pending |
@himanshu007-creator Could you do as suggested in the code review which you have marked as resolved, i.e. revert the changes in files administrator/components/com_admin/tmpl/profile/edit.php
and layouts/joomla/edit/fieldset.php
, so that only the change in file administrator/components/com_users/src/Model/UserModel.php
remains? Thanks in advance.
@himanshu007-creator Could you do as suggested in the code review which you have marked as resolved, i.e. revert the changes in files
administrator/components/com_admin/tmpl/profile/edit.php
andlayouts/joomla/edit/fieldset.php
, so that only the change in fileadministrator/components/com_users/src/Model/UserModel.php
remains? Thanks in advance.
Yes ! I am working on it??
Labels |
Added:
?
|
Category | Administration com_admin Layout com_users | ⇒ | Administration com_users Layout |
Category | Administration Layout com_users | ⇒ | Administration com_users |
Made the changes as mentioned in the review.
@himanshu007-creator Thank you very much.
@toivo @srishty-07 Could you test this PR again? It has received changes meanwhile. Thanks in advance.
I have tested this item
Tested successfully in Beta8-dev of 6 March in Wampserver 3.2.4 using PHP 8.0.2.
I have tested this item
Tested successfully using PHP 8.0.0 and Joomla! 4.0.0-beta8-dev Development(Joomla version).
Labels |
Removed:
?
|
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
?
|
Labels |
Added:
?
Removed: ? |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-10 19:10:15 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
Removed: ? |
@himanshu007-creator Could you switch on "Debug System" and set "Error Reporting" to "Maximum" in Global Configuration in backend? This should then tell you where the error happens. Maybe it should be fixed at that place instead of like you propose it with this PR?