Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33934 META: Issues with MyMobile theme
  3. MDL-32980

MyMobile theme - on any Safari iOS 5.1.1 - error on resources with flag "force download"

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.2, 2.2.3
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
    • Environment:
      ipad 2/3 , iphone 4/4s on iOS 5.1.1
    • Database:
      Any
    • Testing Instructions:
      Hide

      Create a course with a single pdf file with the flag "force download", login with a student user, click on the resource, click back in the browser and refresh the page.

      A blank page is displayed (can't do anything else then closing the browser) and this error can be seen in debug mode.

      Javascript error:
      SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

      Show
      Create a course with a single pdf file with the flag "force download", login with a student user, click on the resource, click back in the browser and refresh the page. A blank page is displayed (can't do anything else then closing the browser) and this error can be seen in debug mode. Javascript error: SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
    • Workaround:
      Hide

      Remove the force download flag

      Show
      Remove the force download flag
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      This error happens on Safari with iOS 5.1.1 (ipad or iphone)

      Create a course with a single pdf file with the flag "force download", login with a student user, click on the resource, click back in the browser and refresh the page.

      A blank page is displayed (can't do anything else then closing the browser) and this error can be seen in debug mode.

      Javascript error:
      SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            lazydaisy Mary Evans added a comment - - edited

            Hi Steve-O,

            Thank you for reporting this problem you are experiencing with MyMobile, but can you tell me if this only affects Safari, in other words does it work OK in all the other browsers or have you not tested it?

            In the mean time I'll hand this over to John Stabinger who maintains this theme.

            Show
            lazydaisy Mary Evans added a comment - - edited Hi Steve-O, Thank you for reporting this problem you are experiencing with MyMobile, but can you tell me if this only affects Safari, in other words does it work OK in all the other browsers or have you not tested it? In the mean time I'll hand this over to John Stabinger who maintains this theme.
            Hide
            lazydaisy Mary Evans added a comment -

            @John

            I've just passed MDL-32980 over to you.

            Show
            lazydaisy Mary Evans added a comment - @John I've just passed MDL-32980 over to you.
            Hide
            steve-o Steve-O added a comment -

            not tested sorry, I have only safari on these devices.

            Show
            steve-o Steve-O added a comment - not tested sorry, I have only safari on these devices.
            Hide
            epsd John Stabinger added a comment -

            I'm not seeing this issue. Tested on ios4 and ios5 with force download set in the file options for a regular pdf. The pdf just opens in a new window. Close the window, then I go back to the last window.

            Is this an issue with the specific file you were trying? Maybe safari could not open that specific file (hence the problem). I can imagine that safari would choke on files (or file types) that it cannot open. Nothing I can do from the theme about that.

            Show
            epsd John Stabinger added a comment - I'm not seeing this issue. Tested on ios4 and ios5 with force download set in the file options for a regular pdf. The pdf just opens in a new window. Close the window, then I go back to the last window. Is this an issue with the specific file you were trying? Maybe safari could not open that specific file (hence the problem). I can imagine that safari would choke on files (or file types) that it cannot open. Nothing I can do from the theme about that.
            Hide
            steve-o Steve-O added a comment -

            hello, thx for your time!

            I just tried to update to the latest Moodle 2.2.3+ (Build: 20120612) but I continue to have the problem.

            as teacher:
            1 add a resource
            2 choose file
            3 upload a pdf (any)
            4 select force download
            5 save

            as student with any ios5.1.1 (on previous versions I never had problems)
            click on the resource
            the file works perfectly I can read it and save it
            click back on the browser
            click refresh or try to navigate in the course
            -> blank page

            christian

            Show
            steve-o Steve-O added a comment - hello, thx for your time! I just tried to update to the latest Moodle 2.2.3+ (Build: 20120612) but I continue to have the problem. as teacher: 1 add a resource 2 choose file 3 upload a pdf (any) 4 select force download 5 save as student with any ios5.1.1 (on previous versions I never had problems) click on the resource the file works perfectly I can read it and save it click back on the browser click refresh or try to navigate in the course -> blank page christian
            Hide
            epsd John Stabinger added a comment -

            There is no fix in 223, so updating would not help. As noted though, I cannot recreate this. Sorry, I simply cannot see the issue. Note that you should not have to click back on the browser as the force download should open it in a new window (so there is nothing to go back to). I have tested on multiple IOS devices (both real and virtual) and this does not happen for me.

            Show
            epsd John Stabinger added a comment - There is no fix in 223, so updating would not help. As noted though, I cannot recreate this. Sorry, I simply cannot see the issue. Note that you should not have to click back on the browser as the force download should open it in a new window (so there is nothing to go back to). I have tested on multiple IOS devices (both real and virtual) and this does not happen for me.
            Hide
            steve-o Steve-O added a comment -

            If you want I can send you a user-pass for my test installation and you can check if it happens in your iphone or not... I tested it with 5 different devices (ipad/iphone) and 3 different moodle 2.2.x

            in all my devices it doesn't open it in a new tab/window but in the same (that's the problem)

            Show
            steve-o Steve-O added a comment - If you want I can send you a user-pass for my test installation and you can check if it happens in your iphone or not... I tested it with 5 different devices (ipad/iphone) and 3 different moodle 2.2.x in all my devices it doesn't open it in a new tab/window but in the same (that's the problem)
            Hide
            steve-o Steve-O added a comment -

            I just sent you an account to your gmail account.

            Show
            steve-o Steve-O added a comment - I just sent you an account to your gmail account.
            Hide
            epsd John Stabinger added a comment -

            Are you sure you have it set to force download? I do not think you do. Here is how file URLs set to force download look:

            <a href="http://newschooldemo.com/moodle/20/mod/resource/view.php?id=97" onclick="window.open('http://newschooldemo.com/moodle/20/pluginfile.php/148/mod_resource/content/4/Chromebooks_for_Education.pdf?forcedownload=1'); return false;">

            Here is how your URL looks:
            <a href="http://vmelab11.usilu.net/moodle22/mod/resource/view.php?id=3">

            So I'm not sure you have this set to force download, or how you have this set at all. Nevertheless, even as is, it worked fine for me (but opened in the same window).

            Show
            epsd John Stabinger added a comment - Are you sure you have it set to force download? I do not think you do. Here is how file URLs set to force download look: <a href="http://newschooldemo.com/moodle/20/mod/resource/view.php?id=97" onclick="window.open('http://newschooldemo.com/moodle/20/pluginfile.php/148/mod_resource/content/4/Chromebooks_for_Education.pdf?forcedownload=1'); return false;"> Here is how your URL looks: <a href="http://vmelab11.usilu.net/moodle22/mod/resource/view.php?id=3"> So I'm not sure you have this set to force download, or how you have this set at all. Nevertheless, even as is, it worked fine for me (but opened in the same window).
            Hide
            steve-o Steve-O added a comment -

            I just sent you a teacher account

            I'm sorry but in all the devices I tested it's not working (5 different iphones/ipads from 5 different people) and in all my production or testing platforms

            Are you using the latest iOS 5.1.1 and Safari?
            The moodle instance I sent you it's a fresh 2.2.3+ with mymobile set as default theme for mobile and tablets.

            Sorry but I have no idea how to replicate this problem

            In my case I just told the teachers to not use force download.

            Show
            steve-o Steve-O added a comment - I just sent you a teacher account I'm sorry but in all the devices I tested it's not working (5 different iphones/ipads from 5 different people) and in all my production or testing platforms Are you using the latest iOS 5.1.1 and Safari? The moodle instance I sent you it's a fresh 2.2.3+ with mymobile set as default theme for mobile and tablets. Sorry but I have no idea how to replicate this problem In my case I just told the teachers to not use force download.
            Hide
            epsd John Stabinger added a comment -

            Yes, IOS 5.1+. I think there is a setting, or user setting that is incorrect on your site. Like I noted above, force download URLs should look like I posted, yours do not. So I think it is a setting (or user setting) somewhere that you changed.

            I can't replicate it in any install I tested on.

            Show
            epsd John Stabinger added a comment - Yes, IOS 5.1+. I think there is a setting, or user setting that is incorrect on your site. Like I noted above, force download URLs should look like I posted, yours do not. So I think it is a setting (or user setting) somewhere that you changed. I can't replicate it in any install I tested on.
            Hide
            steve-o Steve-O added a comment -

            I just installed a fresh 2.2.3+ and the link is alwais the same, and I alwais have the same error

            you have to click on refresh after clicking on the back button.

            Show
            steve-o Steve-O added a comment - I just installed a fresh 2.2.3+ and the link is alwais the same, and I alwais have the same error you have to click on refresh after clicking on the back button.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: