Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3930

Error on creating questionnaire with really long name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3
    • 2.3.2
    • Module: Questionnaire
    • None
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE

      When you create a new questionnaire, if you give it a long name e.g. "a really long title that apparently witll make the system crash if we keep going beyond about 55 characters apparently" then you get the following error

      Debug info: ERROR: value too long for type character varying(64)
      INSERT INTO lab_questionnaire_survey (owner,name,realm,title,subtitle,email,theme,thanks_page,thank_head,thank_body,info) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11) RETURNING id
      [array (
      'owner' => '64',
      'name' => 'a really long title that apparently witll make the system crash if we keep going beyond about 55 characters apparently',
      'realm' => 'private',
      'title' => 'a really long title that apparently witll make the system crash if we keep going beyond about 55 characters apparently',
      'subtitle' => '',
      'email' => '',
      'theme' => '',
      'thanks_page' => '',
      'thank_head' => '',
      'thank_body' => '',
      'info' => '',
      )]
      Error code: dmlwriteexception
      Stack trace:

      line 410 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 239 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 823 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 875 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
      line 927 of /mod/questionnaire/locallib.php: call to pgsql_native_moodle_database->insert_record()
      line 131 of /mod/questionnaire/lib.php: call to questionnaire->survey_update()
      line 458 of /course/modedit.php: call to questionnaire_add_instance()

      Apparently, if you give the questionnaire a really short name, then save it and go back and change the name, everything is fine.

            jenny-gray Jenny Gray (Inactive)
            jenny-gray Jenny Gray (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.