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

Moodle 2.2.2 violates not-null constraint on table mdl_user.descriptionformat when inserting a newuser

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Installation
    • Labels:
      None
    • Environment:
      SLES 11 SP2
      PHP 5.3.8
      Postgres 8.3.14
    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      Install moodle and try to add admin user.

      Show
      Install moodle and try to add admin user.
    • Workaround:
      Hide

      Disable not-null constraint on mdl_user.descriptionformat database column

      Show
      Disable not-null constraint on mdl_user.descriptionformat database column
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      I did a fresh install so when I add "admin" user i get this error message:

      Error writing to database

      I checked the database log and findout this error:

      ERROR: null value in column "descriptionformat" violates not-null constraint
      STATEMENT: INSERT INTO mdluab_user (username,auth,suspended,firstname,lastname,email,maildisplay,mailformat,maildigest,autosubscribe,trackforums,htmleditor,ajax,screenreader,city,country,timezone,lang,imagealt,url,icq,skype,aim,yahoo,msn,idnumber,institution,department,phone1,phone2,address,timemodified,description,descriptionformat,mnethostid,confirmed,timecreated,password) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38) RETURNING id

      The tables are already created when "admin" user add page appears on installing. I disabled the not-null constraint on column descriptionformat in table mdl_user so I have sucess adding admin user. I checked which value was saved in database and that column, descriptionformat, has no value, it is empty. The same error occours when I try to insert a new user/account.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: