← Back to team overview

mahara-contributors team mailing list archive

[Bug 1731333] Re: When requiring profile information for 'country' get error if site has also not set country value

 

Environment to be tested: Master
Browser to be tested: Any browser

Precondition:

1. A user 'Site admin' exists and has site administrator access.
2. Normal user ‘User one’ should exist and does not have a country set.
3. Make sure to have the following line in the config.php file so that
error messages are printed to the screen:

$cfg->productionmode = false;

Steps to reproduce:

1. Log in as ‘Site admin’.
2. Navigate to Administration menu > Configure site > Site options > Site settings.
3.Verify that 'Country' displays the value 'No country selected'. If it doesn't, change it to that value and click the 'Update site options' button.
4. Navigate to Administration menu > Extensions > Plugin administration.
5. Click the ‘Configuration for artefact internal’ settings icon.
6. Check the 'Country' check box for ‘Mandatory fields’.
7. Click the ‘Save’ button.
8. Navigate to Administration menu > Users > User search.
9. Click the user name ‘User one’.
10. Click the ‘Log in as this user’ link.

Expected result: No warning message should be displayed and the country
field should be defaulted to 'New Zealand'.

11. Enter ‘New password’, ‘Confirm password’ and leave the country as ‘New Zealand’.
12. Click the ‘Submit button’
13. Navigate to Main menu > Content > Profile > Contact information.

Expected result: The field displays 'New Zealand'.

14. Log out and Log in back as ‘Site admin’.
15. Navigate to Administration menu > Configure site > Site options > Site settings.
16. Change the value ‘No country selected’ to ‘Australia’ and click the ‘Update site options’ button.
17. Navigate to Administration menu > Users > Add user.
18. Create a normal user with the user name ‘User two’ and click the ‘Create user’ button.
19. Click the ‘Log in as this user’ link.

Expected result: The 'Country' field should default to 'Australia'.

20. Click the ‘log in anyway’ link.

Expected result: Log in should be successful.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1731333

Title:
  When requiring profile information for 'country' get error if site has
  also not set country value

Status in Mahara:
  In Progress

Bug description:
  To test:

  1) Go to Configure site and make sure that Site setting -> Country = No country selected
  2) Go to Extensions -> Internal configuration screen and tick 'Country' under Mandatory fields and under Administration user search and save
  3) Go to Admin -> Users and find a user that doesn't have a country set
  4) Login as that user (can masquerade)

  Before patch:
  Should get [WAR] 84 (lib/pieforms/pieform.php:1343) Invalid value for select "country"

  After patch:
  No warning and field should default to 'New Zealand'

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1731333/+subscriptions


References