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

Importing entries into a database activity from a csv file containing empty lines results in an error

XMLWordPrintable

    • MOODLE_23_STABLE
    • MOODLE_24_STABLE
    • wip-MDL-36113-master
    • Hide

      Test steps

      1. Create a database activity.
      2. Create two fields.
      3. Create a csv file similar to the one mentioned in the description (It must have blank lines in the middle of the data).
      4. Go to [Settings ► Database activity administration ► Import entries].
      5. Upload the file.
        • Ensure that no errors are displayed and that the entries are imported correctly.
      Show
      Test steps Create a database activity. Create two fields. Create a csv file similar to the one mentioned in the description (It must have blank lines in the middle of the data). Go to [Settings ► Database activity administration ► Import entries] . Upload the file. Ensure that no errors are displayed and that the entries are imported correctly.

      We're handling empty lines at the end of the file but if an empty line is found in the middle a fatal error occurs.

      The database activity has a URL and text area field.

      myblog, about me
      http://bob.com,I am bob. Fear me.
      http://joe.com, I am joe. I like Joe. Joe good.
       
      http://blamo.com,blamo i am.
       
       

      Unable to read the raw data from the CSV file
       
      More information about this error
      Debug info:
      Error code: csvfailed
      Stack trace:
       
          line 467 of /lib/setuplib.php: moodle_exception thrown
          line 107 of /mod/data/import.php: call to print_error()

            abgreeve Adrian Greeve
            andyjdavis Andrew Davis
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            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.