Moodle
  1. Moodle
  2. MDL-9619

adding a lesson to the front page produces 'Trying to get property of non-object'

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Lesson
    • Labels:
      None
    • Environment:
      Moodle 1.8 + (2007021503)
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE
    • Rank:
      24572

      Description

      Failed to add a lesson to the front page. Offending line is in mod\lesson\mod_form.php 248:

      if ($this->_cm->id != $mod->id)

      I can't any references to the _cm variable so that may be a starting point.

        Activity

        Hide
        Mike Street added a comment -

        We are having this same issue with the Lesson module. Ours is:

        "Notice: Trying to get property of a non-object in mod/lesson/mod_form.php in line 248"

        Show
        Mike Street added a comment - We are having this same issue with the Lesson module. Ours is: "Notice: Trying to get property of a non-object in mod/lesson/mod_form.php in line 248"
        Hide
        Mike Street added a comment -

        Not that this explains why we had the problem, but a re-install managed to clear things up for us. We were also having many database errors with the Exercise and Lesson modules, but those are also gone now.

        Show
        Mike Street added a comment - Not that this explains why we had the problem, but a re-install managed to clear things up for us. We were also having many database errors with the Exercise and Lesson modules, but those are also gone now.
        Hide
        Mark Nielsen added a comment -

        Thanks for the report!

        Show
        Mark Nielsen added a comment - Thanks for the report!

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: