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

H5P core "Edit H5P content" link has problem with empty spaces

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 4.3.5, 4.4.1
    • 4.1.10, 4.3.3
    • H5P
    • MOODLE_401_STABLE, MOODLE_403_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-81656-403
    • MDL-81656-404
    • Hide
      1. Log in as admin
      2. Navigate to Server > Tasks > Scheduled tasks in site administration
      3. Run the Download available H5P content types from h5p.org task
      4. Create a course
      5. Navigate to course Content bank
      6. Add a new content item, e.g. Accordion
      7. Add an H5P activity to the course
      8. Open file picker in the Package file element
      9. Select Content bank and click the previously created content item
        • Change the Save as field to "My new file.h5p"
        • Press _Select this file
      10. Press Save and display
      11. Press Edit H5P content
      12. Confirm you are redirected to editing the previously created content item
      Show
      Log in as admin Navigate to Server > Tasks > Scheduled tasks in site administration Run the Download available H5P content types from h5p.org task Create a course Navigate to course Content bank Add a new content item, e.g. Accordion Add an H5P activity to the course Open file picker in the Package file element Select Content bank and click the previously created content item Change the Save as field to "My new file.h5p" Press _Select this file Press Save and display Press Edit H5P content Confirm you are redirected to editing the previously created content item

    Description

      If H5P core activity has spaces in file name the "Edit H5P content" link button does not work but causes person editing the file to end up in page with message: "The given URL is incorrect or you cannot edit this file. More information about this error"

       

      Testing instructions 

      1. Create new H5P activity to a course (core version of H5P)

      2. Go to Access the H5P file in the content bank (< if you have no existing h5p content, if you do, skip to point 6 of this list).

      3. Create simple H5P content, e.g. Course presentation, actual content of the H5P does not matter.

      4. Save your new H5P content so it's in the content bank.

      5. Go back to setting page of H5P activity you were creating

      6. Choose the previously created H5P file in File picker > Content bank

      7. When selecting file, make sure that Save as input field has file name with spaces instead of lines. E.g. if default name for the file is course-presentation-1.h5p change that to >>> course presentation.h5p (with empty spaces instead of - lines). Then press Select this file button to select the file.

      8. You are back at the Updating: H5P view. Press Save and display and go to preview your selected H5P

      9. When in page where you are looking your H5P in preview mode, at bottom of the page is link Edit H5P content. Pressing that gives you new page with a message "The given URL is incorrect or you cannot edit this file". 

      If you go back to the editor and edit the H5P filename and remove empty spaces (or replace them e.g. with - or _ or such symbol) and save the changes everything works if you go back to steps 8 and 9.

      If you embed the same H5P e.g. via text editor to a course page and it has Edit H5P content link visible, that works too. But if you go inside the H5P activity and try to use the Edit H5P content link you are back to "The given URL is incorrect..." error page.

      Attachments

        1. MDL-81656.png
          MDL-81656.png
          94 kB
        2. spaces_editbtn.png
          spaces_editbtn.png
          42 kB
        3. spaces_error.png
          spaces_error.png
          23 kB
        4. spaces_filename.png
          spaces_filename.png
          29 kB

        Activity

          People

            pholden Paul Holden
            peterr petririikonen
            Carlos Escobedo Carlos Escobedo
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 9 minutes
                3h 9m

                Clockify

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