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

Adding URL which is a file on a web facing server whose file name contains spaces fails miserably without error message and returns user to empty add URL screen

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5.2, 2.7.3, 2.8
    • Fix Version/s: 2.7.4, 2.8.2
    • Component/s: Resource
    • Labels:
    • Testing Instructions:
      Hide
      1. Add an image to your moodle instance in the root folder called "image test.png"
        To do this, you can use:
        mv image.png image\ test.png
      2. chmod 775 image\ test.png
      3. On a course click add an 'Add an activity or resource' then select 'URL'
      4. Click the "choose a link" button (don't type the url straight in the box manually)
      5. Copy in the link to your file (e.g. http://localhost/integration_master/image test.png) The space should be a real space, not escaped at this stage
      6. Click download
      Show
      Add an image to your moodle instance in the root folder called "image test.png" To do this, you can use: mv image.png image\ test.png chmod 775 image\ test.png On a course click add an 'Add an activity or resource' then select 'URL' Click the "choose a link" button (don't type the url straight in the box manually) Copy in the link to your file (e.g. http://localhost/integration_master/image test.png) The space should be a real space, not escaped at this stage Click download
    • Workaround:
      Hide

      Use %20 instead of space

      Show
      Use %20 instead of space
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-41846-master
    • Sprint:
      BACKEND Sprint 19
    • Issue size:
      Small

      Description

      Steps:
      1. Add activity/ resource -> URL
      2. Pick a file on a web facing server that has contains spaces in the name
      3. Use that url as the URL activity address
      4. Save

      What happens – URL field on Add url screen is blanked and nothing is added, remains on add Url screen, no error message

      Expected behavior – program should encode embedded spaces in file name as '%20'

      NOTE: I chose Unknown for Component(s) because there isn't a URL component in the dropdown

        Attachments

          Activity

            People

            Assignee:
            johno John Okely
            Reporter:
            bobpuffer Bob Puffer
            Peer reviewer:
            Frédéric Massart
            Integrator:
            Dan Poltawski
            Tester:
            Dave Cooper
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/Jan/15