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

Fatal error with H5P due to incompatible "Declaration of core_h5p\framework::fetchExternalData("

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-71970-master
    • Hide

      Downgrade the mod_hvp plugin to 1.21 version (which is the last version without conflicts in the H5P libraries): https://moodle.org/plugins/mod_hvp/1.21.0/22165 

      Show
      Downgrade the mod_hvp plugin to 1.21 version (which is the last version without conflicts in the H5P libraries): https://moodle.org/plugins/mod_hvp/1.21.0/22165  
    • Hide

      Setup

      1. Install the last version of mod_hvp: https://moodle.org/plugins/mod_hvp 
      2. Install the last version of tool_migratehvp2h5p: https://moodle.org/plugins/tool_migratehvp2h5p 

      Testing instructions

      1. Login as admin.
      2. Create a course.
      3. Add a mod_hvp activity (black icon). Upload the attached file and, IMPORTANT!!, "Save and return to course" (don't view the H5P content).
      4. Access to the Site administration page and click the "Migrate content from mod_hvp to mod_h5pactivity" link.
      5. Select the mod_hvp activity you've created and click the "Migrate" button.
      6. Check the activity is migrated correctly and no fatal error is displayed.
      7. Access to the course.
      8. Check a new H5P activity (blue icon) appears in the course and is displayed correctly.

       
       

      Show
      Setup Install the last version of mod_hvp:  https://moodle.org/plugins/mod_hvp   Install the last version of tool_migratehvp2h5p:  https://moodle.org/plugins/tool_migratehvp2h5p   Testing instructions Login as admin. Create a course. Add a mod_hvp activity (black icon). Upload the attached file and, IMPORTANT!!, "Save and return to course" (don't view the H5P content). Access to the Site administration page and click the "Migrate content from mod_hvp to mod_h5pactivity" link. Select the mod_hvp activity you've created and click the "Migrate" button. Check the activity is migrated correctly and no fatal error is displayed. Access to the course. Check a new H5P activity (blue icon) appears in the course and is displayed correctly.    
    • Moppies Kanban

      This issue has been raised in the H5P forum: https://moodle.org/mod/forum/discuss.php?d=421149 

      Setup

      Steps to reproduce the error

      1. Login as admin.
      2. Create a course.
      3. Add a mod_hvp activity. Upload the attached file and, IMPORTANT!!, "Save and return to course" (don't view the H5P content).
      4. Access to the Site administration page and click the "Migrate content from mod_hvp to mod_h5pactivity" link.
      5. Select the mod_hvp activity you've created and click the "Migrate" button.

      Expected result

      The activity is migrated correctly.

       

      Current result

      The following error is displayed:

       

      Fatal error: Declaration of core_h5p\framework::fetchExternalData($url, $data = NULL, $blocking = true, $stream = NULL, $fulldata = false, $headers = Array, $files = Array) must be compatible with H5PFrameworkInterface::fetchExternalData($url, $data = NULL, $blocking = true, $stream = NULL, $fullData = false, $headers = Array, $files = Array, $method = 'POST') in moodle/h5p/classes/framework.php on line 36
       
      

       

      Some extra comments:

      • The first failing version is Moodle 3.11 (so it's working as expected in the Moodle 3.10 series).
      • In MDL-69331, some changes were added, to validate any H5P package before saving it. From what I've seen, that's why it has started failing now: in previous versions, autoloader::register() wasn't called (so there were no conflicts with the H5P interfaces that has changed during the last months).

       
       
       

            sarjona Sara Arjona (@sarjona)
            sarjona Sara Arjona (@sarjona)
            Carlos Escobedo Carlos Escobedo
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 hours, 25 minutes
                1d 3h 25m

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