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

Blogs not working/MySQL Strict Mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.9
    • Component/s: Blog, Database SQL/XMLDB
    • Labels:
      None
    • Environment:
      Apache, MySQL 5.0.45, using mysqli, strict mode on
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      No users on our site can blog. The message "There was an error adding this post in the database" appears when you attempt to add a blog entry. Here are the errors from the Apache log:

      [Tue Sep 04 12:04:35 2007] [error] [client 165.138.83.2] SQL Field 'configdata' doesn't have a default value in C:\\Apache2\\htdocs\\moodle\\blog
      lib.php on line 41. STATEMENT: INSERT INTO mdl_block_instance ( BLOCKID, PAGEID, PAGETYPE, POSITION, WEIGHT, VISIBLE ) VALUES ( 27, 5745, 'blog-view', 'r', '0', '1' ), referer: /moodle/mod/forum/user.php?id=5745&course=631
      [Tue Sep 04 12:04:35 2007] [error] [client 165.138.83.2] SQL Field 'configdata' doesn't have a default value in C:\\Apache2\\htdocs\\moodle\\blog
      lib.php on line 46. STATEMENT: INSERT INTO mdl_block_instance ( BLOCKID, PAGEID, PAGETYPE, POSITION, WEIGHT, VISIBLE ) VALUES ( 28, 5745, 'blog-view', 'r', '1', '1' ), referer: /moodle/mod/forum/user.php?id=5745&course=631
      [Tue Sep 04 12:05:31 2007] [error] [client 137.112.60.249] SQL Field 'content' doesn't have a default value in C:\\Apache2\\htdocs\\moodle\\blog
      edit.php on line 269. STATEMENT: INSERT INTO mdl_post ( MODULE, USERID, COURSEID, SUBJECT, SUMMARY, FORMAT, PUBLISHSTATE, LASTMODIFIED, CREATED ) VALUES ( 'blog', 3, 0, 'test entry', 'my first test blog entry ', 1, 'draft', 1188921931, 1188921931 ), referer: /moodle/blog/edit.php?action=add

      This bug:

      http://tracker.moodle.org/browse/MDL-9722

      says MySQL strict mode is now supported. On my development system, I turned MySQL strict off and blogging now works.

        Attachments

          Activity

            People

            Assignee:
            lazyfish Yu Zhang
            Reporter:
            smithrn Ryan Smith
            Tester:
            Nobody
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08