Author Topic: Drupal user edit profiles - not displaying correct country and state  (Read 1249 times)

Offline Paul Jacobson

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Hi All,

I've come across an issue with 3.0.3 and have just confirmed the same problem can be reproduced in 3.1 sandbox.

When using a profile that contains Country and State as a user edit profile in Drupal (6.15)  the profile incorrectly displays the default country and "select" for state if the record displayed contains any other country than default. This only occurs on the Drupal user edit page, and displays correctly within CiviCRM.

If a member from a non-default country accesses the page "corrects" the entry and saves, the page displays the default country and select for state when it reloads.

I've also noticed that at least one UK state  - West Midlands - displays incorrectly xWMD under 3.0.3 and 3.1 sandbox.

To illustrate both issues I've added country and state to a profile used in the 3.1 sandbox.  If you check My Account in drupal you'll see under "employee info" the incorrect xWMD abbreviation and if you click the edit employee info link the page loads with the default country displayed rather than United Kingdom.

I'm wondering if anyone else is seeing this?

cheers
Paul



« Last Edit: January 11, 2010, 05:32:57 pm by Paul Jacobson »

Offline Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5016
  • Karma: 193
    • My CiviCRM Blog
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #1 on: January 12, 2010, 03:20:36 pm »
Paul - The country / state-province behavior looks like a bug. I've filed an issue - you can follow at:
http://issues.civicrm.org/jira/browse/CRM-5655

Regarding the xWMD abbreviation, there has been work done recently on UK  State / Province list, so I'm pinging Tom K on this since I see that several of the abbreviations in the table have a lower-case 'x' prefix and I have no idea why ??

http://issues.civicrm.org/jira/browse/CRM-5224

From the current SQL script which defines state / province values:
Code: [Select]
(9986, 1226, "xTYW", "Tyne and Wear"),
(9988, 1226, "xGMA", "Greater Manchester"),
(9989, 1226, "xTYR", "Co Tyrone"),
(9990, 1226, "xWYO", "West Yorkshire"),
(9991, 1226, "xSYO", "South Yorkshire"),
(9992, 1226, "xMSD", "Merseyside"),
(9993, 1226, "xBRK", "Berkshire"),
(9994, 1226, "xWMD", "West Midlands"),
(9998, 1226, "xWGM", "West Glamorgan"),
(9999, 1226, "xLON", "Greater London"),
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My faves: Relative dates in search forms and Scheduled reminders for membership renewal.

Offline mrfelton

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
    • KirkDesigns
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #2 on: January 13, 2010, 01:11:51 am »
I (Tom K) have no idea why this is, but it definitely looks like a bug. Those x prefixes should be removed.

Offline Piotr Szotkowski

  • Administrator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 55
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #3 on: January 13, 2010, 01:17:58 am »
I (Tom K) have no idea why this is, but it definitely looks like a bug. Those x prefixes should be removed.

Do the codes (after dropping the prefixes) look sane (e.g., have the right postal meaning)? If so, I’ll drop the prefixes before tomorrow’s 3.1.beta5.

Offline Paul Jacobson

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #4 on: January 13, 2010, 02:32:29 am »
Thanks everyone.

The postal codes are correct with the x removed.

I'll definitely keep an eye on the progress of the bug. The group I run the site for only has about 15 "non-default country members" but we are about to send out subscription reminders and having just transitioned from a poorly maintained access database most need to edit their addresses - the first test renewal caused some confusion with the changes to country and state not "sticking".

I've modded the sql database on my install to remove the x's so that solves that problem for me in the interim.

cheers
Paul  
« Last Edit: January 13, 2010, 02:45:47 am by Paul Jacobson »

Offline Paul Jacobson

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #5 on: January 13, 2010, 01:40:28 pm »
Hi

I see that this bug has been fixed and marked as closed but this appears to have only been done in the 3.1 branch.  Is it possible for the fix to be applied to 3.0.4 or a patch against 3.0.3 made available?

thanks
Paul

Online Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 12643
  • Karma: 396
    • CiviCRM site
  • CiviCRM version: 4.1
  • CMS version: Drupal 7, Joomla 1.7
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #6 on: January 13, 2010, 03:13:33 pm »

we will backport it to 3.0 and will be part of 3.0.4

in the meantime u can patch your local install (click on the fisheye link in jira for a set of patches)

lobo
Found this reply helpful? Contribute NOW and help improve CiviCRM with the Make it Happen! initiative.

My current favorite is CiviMobile.

Donate NOW

Offline Paul Jacobson

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #7 on: January 13, 2010, 06:26:17 pm »
hi lobo,

I knew there had to be an easier way than finding the diffs in svn with ZigVersion :)

local install is patched with kiran's changes and everything is running smoothly. thanks for the speedy fix.

cheers
Paul

Offline Piotr Szotkowski

  • Administrator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 55
Re: Drupal user edit profiles - not displaying correct country and state
« Reply #8 on: January 14, 2010, 12:30:05 am »
The postal codes are correct with the x removed.

Ok, I went on and fixed the codes in r25877.

I dropped the ‘x’s and actually changed some codes to match the below lists; let me know if I broke anything this way.

http://bifhsgo.ca/chapman_codes.htm
http://logisticsworld.com/ukcounties.asp