CiviCRM

Stored Country is ignored and default country is used when editing a Profile

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed/Completed
  • Affects Version/s: 3.0.3, 3.1
  • Fix Version/s: 3.0.4, 3.1
  • Component/s: CiviCRM Profile
  • Labels:
    None

Description

Contact address has non-default country value and associated province value. Profile with Country and State / Province is edited (either from My Account or directly - as in http://sandbox.civicrm.org/civicrm/profile/edit?gid=10&reset=1). The default country shows in the 'select' instead of the saved country and the state/province is empty since the stored value isn't valid for the default country.

http://forum.civicrm.org/index.php/topic,11628.0.html

Screenshots from sandbox attached. contact_id 102 country is stored as United Kingdom (Until / unless someone edits it). I also reproduced easily on my 3.0 local sandbox.

If this is an easy fix we should fix in 3.0.4 since it's data-destructive potentially.
  1. Picture 3.png
    12/Jan/10 11:19 PM
    54 kB
    David Greenberg
  2. Picture 4.png
    12/Jan/10 11:19 PM
    38 kB
    David Greenberg

Activity

Hide
Rajan P Mayekar added a comment -
Tested in r25865.
Show
Rajan P Mayekar added a comment - Tested in r25865.
Hide
Paul Jacobson added a comment -
Is there a patch against 3.0.3 available for the bug fix?
Show
Paul Jacobson added a comment - Is there a patch against 3.0.3 available for the bug fix?
Hide
Donald A. Lobo added a comment -

this is an important issue, so please backport to 3.0

Show
Donald A. Lobo added a comment - this is an important issue, so please backport to 3.0
Hide
Deepak Srivastava added a comment -
The fix http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.1/CRM/Profile/Form/Edit.php?r1=25604&r2=25860 is causing following code to come into effect:

        if ( $this->_mode == self::MODE_EDIT ) {
            $admin = false;
            // show all fields that are visibile: if we are a admin or the same user or in registration mode
            if ( CRM_Core_Permission::check( 'administer users' ) ||
                 $this->_id == $session->get( 'userID' ) ) {
                $admin = true;
            }
        }

which makes $admin to false for ACL behaviour, resulting in not displaying the profile form fields.
Check http://forum.civicrm.org/index.php/topic,11656.msg49995.html#msg49995 for more details.
Show
Deepak Srivastava added a comment - The fix http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.1/CRM/Profile/Form/Edit.php?r1=25604&r2=25860 is causing following code to come into effect:         if ( $this->_mode == self::MODE_EDIT ) {             $admin = false;             // show all fields that are visibile: if we are a admin or the same user or in registration mode             if ( CRM_Core_Permission::check( 'administer users' ) ||                  $this->_id == $session->get( 'userID' ) ) {                 $admin = true;             }         } which makes $admin to false for ACL behaviour, resulting in not displaying the profile form fields. Check http://forum.civicrm.org/index.php/topic,11656.msg49995.html#msg49995 for more details.
Hide
Deepak Srivastava added a comment -
Profile acl issue fixed in r25902 and also backported to 3.0 (r25920).
Show
Deepak Srivastava added a comment - Profile acl issue fixed in r25902 and also backported to 3.0 (r25920).
Hide
Kiran Jagtap added a comment -
Tested and Confirmed profile functionality at r25921
Show
Kiran Jagtap added a comment - Tested and Confirmed profile functionality at r25921

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: