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

Import PowerPoint: Error writing to database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Lesson
    • Labels:
      None
    • Environment:
      PHP Version 5.3.3, MySQL version: 5.1.51
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      I'm using Moodle 2.0 RC1. I tried importing a PowerPoint file (created with 2003, saved to html, and zipped). I got this error displaying in the browser:

      Error writing to database
      Debug info:
      Stack trace:

      • line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 816 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 858 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      • line 165 of /mod/lesson/importppt.php: call to mysqli_native_moodle_database->insert_record()

      And the server log contained the following info:

      Default exception handler: Error writing to database Debug: Incorrect string value: '
      x8Bdate/...' for column 'contents' at row 1\nINSERT INTO lesson_pages (lessonid,prevpageid,nextpageid,qtype,qoption,layout,display,timecreated,timemodified,title,contents) VALUES(?,?,?,?,?,?,?,?,?,?,?)\narray (\n 0 => '1',\n 1 => 2,\n 2 => 0,\n 3 => '20',\n 4 => 0,\n 5 => 1,\n 6 => 1,\n 7 => 1288732970,\n 8 => 0,\n 9 => 'Page 3',\n 10 => '<p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p>\x8bdate/time\x9b</p><p>Haga clic para modificar el estilo de texto del patr\xf3n</p><p>Segundo nivel</p><p>Tercer nivel</p><p>Cuarto nivel</p><p>Quinto nivel</p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p>\x8b#\x9b</p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p>11</p>',\n)\n* line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown\n* line 816 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()\n* line 858 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()\n* line 165 of /mod/lesson/importppt.php: call to mysqli_native_moodle_database->insert_record()\n, referer: http://www....../moodle/mod/lesson/importppt.php?id=18&pageid=0

      PHP Warning: htmlspecialchars(): Invalid multibyte sequence in argument in /sites/e-knowledge.ca/www/moodle/lib/weblib.php on line 119, referer: http://www....../moodle/mod/lesson/importppt.php?id=18&pageid=0

      Note that I always got the same error, no matter if the PowerPoint presentation was 50 pages with bullets and pictures or 2 pages with no bullets and no pictures.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              danmarsden Dan Marsden
              Reporter:
              dvillemure Diane Villemure
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: