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

Blog Error Writing to Database

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.2.5, 2.3.2
    • 2.3
    • Blog
    • MOODLE_23_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MDL-33885-master
    • Hide

      Test steps

      1. Create a new blog entry
      2. Fill-in the subject field, add a content and submit
      3. Make sure the entry is created
      4. Create a new blog entry
      5. Use Firebug to remove the 'maxlength' attribute from the subject field
      6. Make sure you cannot save the entry if the subject exceeds 128 characters
      7. Repeat those steps with Javascript disabled in your browser
      Show
      Test steps Create a new blog entry Fill-in the subject field, add a content and submit Make sure the entry is created Create a new blog entry Use Firebug to remove the 'maxlength' attribute from the subject field Make sure you cannot save the entry if the subject exceeds 128 characters Repeat those steps with Javascript disabled in your browser

    Description

      When posting a blog with a really long title, you get this error.

      Debug info: Data too long for column 'subject' at row 1
      INSERT INTO mdl_post (userid,subject,summary,rating,attachment,publishstate,courseid,groupid,module,moduleid,coursemoduleid,content,format,uniquehash,lastmodified,created,usermodified) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
      [array (
      0 => '3',
      1 => 'adsfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf',
      2 => NULL,
      3 => 0,
      4 => NULL,
      5 => 'site',
      6 => 2,
      7 => 0,
      8 => 'blog',
      9 => 0,
      10 => 0,
      11 => NULL,
      12 => 1,
      13 => '',
      14 => 1340176615,
      15 => 1340176615,
      16 => NULL,
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 410 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 948 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 990 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 356 of /blog/locallib.php: call to mysqli_native_moodle_database->insert_record()
      line 186 of /blog/edit.php: call to blog_entry->add()

      Attachments

        Issue Links

          Activity

            People

              fred Frédéric Massart
              phalacee Jason Fowler
              Jason Fowler Jason Fowler
              Dan Poltawski Dan Poltawski
              Rajesh Taneja Rajesh Taneja
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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