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

URL resources to unknown types do not handle errors well

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.4.2
    • Component/s: Resource
    • Labels:
    • Testing Instructions:
      Hide
      1. within a course, add url resource
      2. add external url to non-existance page (eg: http://yourmoodle.com/notfound.html)
      3. set display to embed
      4. select 'save and display'
      5. VERIFY: You can see the 'not found' page embedded within the page.
      6. within a course, add url resource
      7. add external url to a page that exists
      8. set display to embed
      9. select 'save and display'
      10. VERIFY: that you can see the resource
      Show
      within a course, add url resource add external url to non-existance page (eg: http://yourmoodle.com/notfound.html ) set display to embed select 'save and display' VERIFY: You can see the 'not found' page embedded within the page. within a course, add url resource add external url to a page that exists set display to embed select 'save and display' VERIFY: that you can see the resource
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-30769_iframe

      Description

      I would like to request change in mod/url. During addition of new url resource module tries to determine mime type served by URL. If determined type is not one from list of specially handled contents it uses general display method which is to embed the URL in this HTML tag:

      <div class="resourcecontent resourcegeneral">
      <object id="resourceobject" data="<url>" type="<mimetype>" width="800" height="600">
      $param
      $clicktoopen
      </object>
      </div>

      When you add a url resource to a course with location that does not exist (for example http://www3.open.ac.uk/courses/bin/p12.dll?C01S103) the error page will not be displayed to the user since most modern browsers refuse to load embedded page that returns HTTP code 404.

      We find that behavior not to our liking. We would prefer that error page to be displayed to the user. Would it be possible to add the setting where iframe usage could be forced for a specific URL and thus always displayed?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rwijaya Rossiani Wijaya
              Reporter:
              darko.miletic Darko Miletic
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Dan Poltawski
              Tester:
              David Monllaó
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/13