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

"Failed to get record in forumng" when converting an existing forum

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.14
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      Forum NG version : 3.7
      Moodle version 1.9.14

      Testing ForumNG I have come across an issue when converting an existing forum. The new forum is created but no user data is converted. This is the error I get:

      Creating forum structure... Notice: Undefined property: stdClass::$id in /xxxx/moodle/mod/forumng/forum.php on line 4437

      #0 /mod/forumng/forum.php(915): forum_utils::get_record('forumng', 'id', NULL)
      #1 /mod/forumng/forum.php(4437): forum::get_from_id(NULL, -1)
      #2 /mod/forumng/convert.php(66): forum::create_from_old_forum(Object(stdClass), '548', true, true, true)
      #3

      {main}

      A forum error occurred. Please try again later, or try something else.
      Error message: Failed to get record in forumng
      More information about this error

      Stack trace:
      line 5896 of lib/weblib.php: call to debugging()
      line 529 of mod/forumng/forum_utils.php: call to print_error()
      line 78 of mod/forumng/convert.php: call to forum_utils::handle_exception()

      Steps to cause that error :

      • Create new course
      • Add activity / add new forum
      • Enter junk for name/description and 'Save and return to course'
      • Add 1 post in the forum
      • Add activity / add new ForumNG
      • select to convert forum
      • select forum that was made before, and click convert

      --> previous error occurs

      If you need something more ...

        Attachments

          Activity

            People

            Assignee:
            quen Sam Marshall
            Reporter:
            pmaury pmaury
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: