? ? ? Pending

User tests: Successful: Unsuccessful:

avatar himanshu007-creator
himanshu007-creator
27 Feb 2021

Summary of Changes

If a user makes no changes to his profile and tries to click on Save or Save & Close button, an ERROR Message pops up.

Testing Instructions

USE PHP 8

  1. click on User Menu option at the top-right.
  2. select Edit Account option
  3. without making any changes to it, click on Save or Save & Close buttons.

error message pops up

  1. now apply this patch and repeat steps 1-3
                                             NO ERROR MESSAGE POPS NOW
  1. Go to System/Plugins
  2. Search for 'Auth'
  3. Enable any of the Two Factor Authentication Pluggin
  •        > Two Factor Authentication - YubiKey 
    
  •         > Two Factor Authentication - Google Authenticator
    
  1. repeat steps 1-3
  2. NO ERROR MESSAGE POPS NOW .

Actual result BEFORE applying this Pull Request

2021-02-27 (10)

Expected result AFTER applying this Pull Request

2021-02-27 (7)

Documentation Changes Required

No

avatar himanshu007-creator himanshu007-creator - open - 27 Feb 2021
avatar himanshu007-creator himanshu007-creator - change - 27 Feb 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Feb 2021
Category Administration com_admin Layout
avatar himanshu007-creator himanshu007-creator - change - 27 Feb 2021
The description was changed
avatar himanshu007-creator himanshu007-creator - edited - 27 Feb 2021
avatar himanshu007-creator himanshu007-creator - change - 27 Feb 2021
The description was changed
avatar himanshu007-creator himanshu007-creator - edited - 27 Feb 2021
avatar richard67
richard67 - comment - 27 Feb 2021

@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?

avatar himanshu007-creator
himanshu007-creator - comment - 27 Feb 2021

@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

  1. / layouts / joomla / edit / fieldset.php
  2. / administrator / components / com_admin / tmpl / profile / edit.php

2021-02-27 (11)

avatar srishty-07 srishty-07 - test_item - 27 Feb 2021 - Tested successfully
avatar srishty-07
srishty-07 - comment - 27 Feb 2021

I have tested this item successfully on 751df4b

I have tested the patch
before applying the patch error was coming after applying it there was no error.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32540.
avatar joomdonation
joomdonation - comment - 27 Feb 2021

@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.

avatar himanshu007-creator
himanshu007-creator - comment - 27 Feb 2021

@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 ?

avatar bembelimen
bembelimen - comment - 27 Feb 2021

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.

avatar bembelimen
bembelimen - comment - 28 Feb 2021

@himanshu007-creator could you additional add the 2nd suggestion from @joomdonation to your PR (just make the change in the same branch and push)

avatar himanshu007-creator
himanshu007-creator - comment - 28 Feb 2021

@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.

avatar himanshu007-creator himanshu007-creator - change - 28 Feb 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Feb 2021
Category Administration com_admin Layout Administration com_admin com_users Layout
avatar toivo toivo - test_item - 3 Mar 2021 - Tested successfully
avatar toivo
toivo - comment - 3 Mar 2021

I have tested this item successfully on 8630a33

Tested successfully in Beta8-dev of 3 March using Wampserver 3.2.4 and PHP 8.0.2.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32540.

avatar srishty-07 srishty-07 - test_item - 4 Mar 2021 - Tested successfully
avatar srishty-07
srishty-07 - comment - 4 Mar 2021

I have tested this item successfully on 8630a33

Tested successfully using PHP 8.0.0 and Joomla! 4.0.0-beta8-dev Development(Joomla version).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32540.

avatar richard67 richard67 - change - 4 Mar 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 4 Mar 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32540.

avatar wilsonge
wilsonge - comment - 5 Mar 2021

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.

avatar richard67
richard67 - comment - 5 Mar 2021

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?

avatar Quy Quy - change - 5 Mar 2021
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 6 Mar 2021

@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.

avatar himanshu007-creator
himanshu007-creator - comment - 6 Mar 2021

@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.

Yes ! I am working on it??

avatar himanshu007-creator himanshu007-creator - change - 6 Mar 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 6 Mar 2021
Category Administration com_admin Layout com_users Administration com_users Layout
avatar joomla-cms-bot joomla-cms-bot - change - 6 Mar 2021
Category Administration Layout com_users Administration com_users
avatar himanshu007-creator
himanshu007-creator - comment - 6 Mar 2021

Made the changes as mentioned in the review.

avatar richard67
richard67 - comment - 6 Mar 2021

@himanshu007-creator Thank you very much.

@toivo @srishty-07 Could you test this PR again? It has received changes meanwhile. Thanks in advance.

avatar toivo toivo - test_item - 6 Mar 2021 - Tested successfully
avatar toivo
toivo - comment - 6 Mar 2021

I have tested this item successfully on c85a3a3

Tested successfully in Beta8-dev of 6 March in Wampserver 3.2.4 using PHP 8.0.2.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32540.

avatar srishty-07 srishty-07 - test_item - 6 Mar 2021 - Tested successfully
avatar srishty-07
srishty-07 - comment - 6 Mar 2021

I have tested this item successfully on c85a3a3

Tested successfully using PHP 8.0.0 and Joomla! 4.0.0-beta8-dev Development(Joomla version).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32540.

avatar richard67 richard67 - change - 6 Mar 2021
Labels Removed: ?
avatar richard67 richard67 - alter_testresult - 6 Mar 2021 - toivo: Tested successfully
avatar richard67 richard67 - alter_testresult - 6 Mar 2021 - srishty-07: Tested successfully
avatar richard67 richard67 - change - 6 Mar 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 6 Mar 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32540.

avatar rdeutz rdeutz - change - 10 Mar 2021
Labels Added: ? ?
avatar rdeutz rdeutz - edited - 10 Mar 2021
avatar rdeutz rdeutz - change - 10 Mar 2021
The description was changed
avatar rdeutz rdeutz - change - 10 Mar 2021
The description was changed
avatar rdeutz rdeutz - edited - 10 Mar 2021
avatar rdeutz rdeutz - change - 10 Mar 2021
Labels Added: ?
Removed: ?
avatar rdeutz rdeutz - change - 10 Mar 2021
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: ?
avatar rdeutz rdeutz - close - 10 Mar 2021
avatar rdeutz rdeutz - merge - 10 Mar 2021

Add a Comment

Login with GitHub to post a comment