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

With navigation block set to be displayed on any page, H5P activities show "Trying to get property 'id' of non-object" error

XMLWordPrintable

    • MOODLE_311_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-71955-401
    • Hide
      1. Log in as admin
      2. Navigate to Appearance > Themes > Boost in site administration
      3. Remove navigation from Unneeded blocks and save changes
      4. Navigate to Home from primary navigation
      5. Add Navigation block
      6. Press Configure navigation block
        • Where this block appears > Page contexts: Display throughout the entire site
      7. Navigate to Server > Tasks > Scheduled tasks in site administration
      8. Run the Download available H5P content types from h5p.org task manually (if it hasn't already run)
      9. Navigate to site content bank
      10. Add an Accordion item
        • Fill in the form
      11. Create a course
      12. Add a H5P activity
        • Package file: Open file picker, select Content bank and find the item you previously created
      13. Press Save and display
      14. Confirm no PHP warning is present on the page
      Show
      Log in as admin Navigate to Appearance > Themes > Boost in site administration Remove navigation from Unneeded blocks and save changes Navigate to Home from primary navigation Add Navigation block Press Configure navigation block Where this block appears > Page contexts: Display throughout the entire site Navigate to Server > Tasks > Scheduled tasks in site administration Run the Download available H5P content types from h5p.org task manually (if it hasn't already run) Navigate to site content bank Add an Accordion item Fill in the form Create a course Add a H5P activity Package file: Open file picker, select Content bank and find the item you previously created Press Save and display Confirm no PHP warning is present on the page

      Steps to reproduce:

      1. Login as admin.
      2. Create a course.
      3. Add an H5P activity.
      4. Add the "Navigation" block to the main course page.
      5. Configure the "Navigation" block and set "Display on page types" to "Any page".
      6. Access to the H5P activity you created.

       

      Expected behaviour

      The H5P player is displayed without any error.

      Current behaviour

      Above the H5P player, the following error is displayed: "Notice: Trying to get property 'id' of non-object in moodle/lib/navigationlib.php on line 1407"

       

      It happens with any of the H5P contents displayed in the course (not just the H5P activity). And I've been able to reproduce it in Moodle 3.11 onwards (in Moodle 3.10 is working as expected).

            pholden Paul Holden
            sarjona Sara Arjona (@sarjona)
            Carlos Escobedo Carlos Escobedo
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 31 minutes
                1h 31m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.