Country can't be added via CSV

Bug #1705866 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Low
Unassigned

Bug Description

When you add the country field into the CSV file to upload to Mahara it doesn't yield the desired result. I tried to use the country code "NZ". The upload of the CSV worked fine, but when I logged in as the user, it showed the following error message:

[WAR] 06 (lib/pieforms/pieform.php:1343) Invalid value for select "country"
Call stack (most recent first):

    log_message("Invalid value for select "country"", 8, true, true, "/home/kristina/code/mahara/htdocs/lib/pieforms/pie...", 1343) at /home/kristina/code/mahara/htdocs/lib/errors.php:521
    error(1024, "Invalid value for select "country"", "/home/kristina/code/mahara/htdocs/lib/pieforms/pie...", 1343, array(size 2)) at Unknown:0
    trigger_error("Invalid value for select "country"", 1024) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:1343
    Pieform::info("Invalid value for select "country"") at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform/elements/select.php:143
    pieform_element_select(object(Pieform), array(size 10)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:1509
    Pieform->build_element_html(array(size 10)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:720
    Pieform->build() at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:169
    Pieform::process(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/mahara.php:4838
    pieform(array(size 8)) at /home/kristina/code/mahara/htdocs/artefact/internal/index.php:197

I suspect that is due to the fact that the field is not a free form field but requires a specific value for the country. The human-readable name can't be used as that is different in each language. There are 2 possibilities:

1. Remove the field from the CSV file upload options.
2. Provide more information on what values the field can take.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.