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

navigation lib generating php warnings in messaging

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.2
    • 2.2
    • Messages, Navigation
    • Any
    • MOODLE_22_STABLE
    • MOODLE_22_STABLE
    • wip-MDL-30543-m22
    • Hide
      1. Log in as an admin
      2. Browse to a course (any course will do)
      3. In the settings block expand `My profile settings` and click `Messaging`
      4. Make sure the URL has a course param on it
      5. Make sure you don't get a fatal error
      6. Repeat as a student (will need to be a course you are enrolled in)
      Show
      Log in as an admin Browse to a course (any course will do) In the settings block expand `My profile settings` and click `Messaging` Make sure the URL has a course param on it Make sure you don't get a fatal error Repeat as a student (will need to be a course you are enrolled in)

      Originally discovered while testing MDL-30260. If you go to My profile settings > messaging from the front page all is well. If you go to a course page then access My profile settings > messaging you get a php warning.

      Ankit reported this error message

      ( ! ) Notice: Undefined property: stdClass::$format in H:\wamp\www\repo2\master\moodle\lib\navigationlib.php on line 1555
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0011	438912	{main}( )	..\edit.php:0
      2	0.2993	17618816	global_navigation->find( )	..\edit.php:78
      3	0.2993	17618816	global_navigation->initialise( )	..\navigationlib.php:2422
      4	0.3703	22540192	global_navigation->load_course_sections( )	..\navigationlib.php:1239
       
      ( ! ) Notice: Undefined property: stdClass::$format in H:\wamp\www\repo2\master\moodle\lib\navigationlib.php on line 1556
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0011	438912	{main}( )	..\edit.php:0
      2	0.2993	17618816	global_navigation->find( )	..\edit.php:78
      3	0.2993	17618816	global_navigation->initialise( )	..\navigationlib.php:2422
      4	0.3703	22540192	global_navigation->load_course_sections( )	..\navigationlib.php:1239
      Coding problem - missing course modinfo property in get_fast_modinfo() call
      line 1098 of \lib\modinfolib.php: call to debugging()
      line 1584 of \lib\navigationlib.php: call to get_fast_modinfo()
      line 1645 of \lib\navigationlib.php: call to global_navigation->generate_sections_and_activities()
      line 1567 of \lib\navigationlib.php: call to global_navigation->load_generic_course_sections()
      line 1239 of \lib\navigationlib.php: call to global_navigation->load_course_sections()
      line 2422 of \lib\navigationlib.php: call to global_navigation->initialise()
      line 78 of \message\edit.php: call to global_navigation->find()
       
      ( ! ) Notice: Undefined property: stdClass::$numsections in H:\wamp\www\repo2\master\moodle\lib\navigationlib.php on line 1585
      Call Stack
      #	Time	Memory	Function	Location
      1	0.0011	438912	{main}( )	..\edit.php:0
      2	0.2993	17618816	global_navigation->find( )	..\edit.php:78
      3	0.2993	17618816	global_navigation->initialise( )	..\navigationlib.php:2422
      4	0.3703	22540192	global_navigation->load_course_sections( )	..\navigationlib.php:1239
      5	0.3709	22540824	global_navigation->load_generic_course_sections( )	..\navigationlib.php:1567
      6	0.3709	22540872	global_navigation->generate_sections_and_activities( )	..\navigationlib.php:1645

      As a student I am getting

      Notice: Undefined property: stdClass::$format in /home/andrew/Desktop/code/moodle/int/master/lib/navigationlib.php on line 1555 Notice: Undefined property: stdClass::$format in /home/andrew/Desktop/code/moodle/int/master/lib/navigationlib.php on line 1556 

      As admin I get

      Coding problem - missing course modinfo property in get_fast_modinfo() call
       
          line 1098 of /lib/modinfolib.php: call to debugging()
          line 983 of /lib/completionlib.php: call to get_fast_modinfo()
          line 47 of /report/progress/lib.php: call to completion_info->get_activities()
          line 2258 of /lib/navigationlib.php: call to report_progress_extend_navigation_course()
          line 1238 of /lib/navigationlib.php: call to global_navigation->add_course_essentials()
          line 2418 of /lib/navigationlib.php: call to global_navigation->initialise()
          line 78 of /message/edit.php: call to global_navigation->find()
       
      Notice: Undefined property: stdClass::$format in /home/andrew/Desktop/code/moodle/int/master/lib/navigationlib.php on line 1555 Notice: Undefined property: stdClass::$format in /home/andrew/Desktop/code/moodle/int/master/lib/navigationlib.php on line 1556 

            samhemelryk Sam Hemelryk
            andyjdavis Andrew Davis
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Andrew Davis Andrew Davis
            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.