Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26177

Can't edit profiles when there are custom fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Administration
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      To reproduce:

      0. Logged in as admin.
      1. Create a Text input custom user profile field that must be unique (not sure if the unique bit is really necessary)
      2. Go to browse list of users, and click to edit someone's profile.
      3. Type something in the custom field box, and click save.

      Result:

      Comparisons of text column conditions are not allowed. Please use sql_compare_text() in your query.

      Stack trace:
      line 513 of /lib/dml/moodle_database.php: dml_exception thrown
      line 1288 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
      line 134 of /user/profile/lib.php: call to moodle_database->get_field()
      line 399 of /user/profile/lib.php: call to profile_field_base->edit_validate_field()
      line 159 of /user/editadvanced_form.php: call to profile_validation()
      line 438 of /lib/formslib.php: call to user_editadvanced_form->validation()
      line 397 of /lib/formslib.php: call to moodleform->validate_defined_fields()
      line 484 of /lib/formslib.php: call to moodleform->is_validated()
      line 128 of /user/editadvanced.php: call to moodleform->get_data()

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              21/Feb/11