Moodle
  1. Moodle
  2. MDL-41352

Mymobile theme: javascript error on course pages

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.5.3
    • Component/s: Themes
    • Labels:
    • Environment:
      Chrome
    • Testing Instructions:
      Hide

      In a desktop browser and on mobile devices

      1. Turn on all debugging (I commented it out in my config).
      2. Turn on theme designer mode and turn on cachejs. (MDK run dev.php)
      3. In clean theme, log in as admin
      4. Enter a course that does not have the My Private Files block
      5. Turn editing on
      6. Swap to MyMobile theme.
      7. Check for errors in the console (on Desktop)
      8. Ensure drag and drop of sections is working (on Desktop)
      Show
      In a desktop browser and on mobile devices Turn on all debugging (I commented it out in my config). Turn on theme designer mode and turn on cachejs. (MDK run dev.php) In clean theme, log in as admin Enter a course that does not have the My Private Files block Turn editing on Swap to MyMobile theme. Check for errors in the console (on Desktop) Ensure drag and drop of sections is working (on Desktop)
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull 2.5 Branch:
    • Story Points:
      13
    • Rank:
      52965
    • Sprint:
      FRONTEND Sprint 5

      Description

      Enable mymobile. On the front page, javascript erro:

      GET http://jerome.moodle.local/m/integration_master/theme/jquery.php/core/jquery-1.10.2.min.map 404 (not found) jerome.moodle.local/m/integration_master/:1
      Uncaught TypeError: Cannot call method 'all' of null

        Issue Links

          Activity

          Hide
          Jérôme Mouneyrac added a comment -

          It seems like a regression, I have no problem on master.

          Show
          Jérôme Mouneyrac added a comment - It seems like a regression, I have no problem on master.
          Hide
          Mary Evans added a comment -

          I thought MyMobile was being depreciated in 2.6? Or is this just to fix stable backlog?

          Show
          Mary Evans added a comment - I thought MyMobile was being depreciated in 2.6? Or is this just to fix stable backlog?
          Hide
          Mary Evans added a comment -

          Just adding Gareth J Barnard as a watcher as he knows more about MyMobile jQuery stuff than me.

          Show
          Mary Evans added a comment - Just adding Gareth J Barnard as a watcher as he knows more about MyMobile jQuery stuff than me.
          Hide
          Gareth J Barnard added a comment -

          I came across this the other day when using jQuery in a theme (not MyMobile). The 'map' file is used for debugging in browsers with source map capability such as Chrome -> http://jquery.com/download/ & http://code.jquery.com/jquery-1.10.2.min.map. We should probably include it in '/lib/jquery/' for generic jQuery support as against for MyMobile which will be removed in M2.6 -> MDL-40874.

          But I don't think the 404 is related rather the version of jQuery and jQueryMobile compatibility.

          Show
          Gareth J Barnard added a comment - I came across this the other day when using jQuery in a theme (not MyMobile). The 'map' file is used for debugging in browsers with source map capability such as Chrome -> http://jquery.com/download/ & http://code.jquery.com/jquery-1.10.2.min.map . We should probably include it in '/lib/jquery/' for generic jQuery support as against for MyMobile which will be removed in M2.6 -> MDL-40874 . But I don't think the 404 is related rather the version of jQuery and jQueryMobile compatibility.
          Hide
          Marina Glancy added a comment - - edited

          I was trying to reproduce it - there are no errors on frontpage but when I click on "My home" for admin user, I get fatal JS error:

          Firefox:

          TypeError: M.block_private_files is undefined
          (9 out of range 6)
          

          and page freezes

          Chrome:

          Uncaught TypeError: Cannot call method 'init_tree' of undefined
          (anonymous function)
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e.Loader._finish yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          e.Loader._onSuccess yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          p yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          e.Loader._insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32
          e.Loader._continue yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32
          e.Loader.insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32
          e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function)
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function)
          (anonymous function) jquery-1.10.2.min.js:4
          x.extend.globalEval jquery-1.10.2.min.js:4
          x.fn.extend.domManip jquery-1.10.2.min.js:5
          x.fn.extend.append jquery-1.10.2.min.js:5
          x.fn.(anonymous function) jquery-1.10.2.min.js:5
          $.ajax.success jquery.mobile-1.3.1.js:4366
          c jquery-1.10.2.min.js:4
          p.fireWith jquery-1.10.2.min.js:4
          k jquery-1.10.2.min.js:6
          r jquery-1.10.2.min.js:6
          
          Show
          Marina Glancy added a comment - - edited I was trying to reproduce it - there are no errors on frontpage but when I click on "My home" for admin user, I get fatal JS error: Firefox: TypeError: M.block_private_files is undefined (9 out of range 6) and page freezes Chrome: Uncaught TypeError: Cannot call method 'init_tree' of undefined (anonymous function) e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e.Loader._finish yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 e.Loader._onSuccess yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 p yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 e.Loader._insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32 e.Loader._continue yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32 e.Loader.insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32 e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) (anonymous function) jquery-1.10.2.min.js:4 x.extend.globalEval jquery-1.10.2.min.js:4 x.fn.extend.domManip jquery-1.10.2.min.js:5 x.fn.extend.append jquery-1.10.2.min.js:5 x.fn.(anonymous function) jquery-1.10.2.min.js:5 $.ajax.success jquery.mobile-1.3.1.js:4366 c jquery-1.10.2.min.js:4 p.fireWith jquery-1.10.2.min.js:4 k jquery-1.10.2.min.js:6 r jquery-1.10.2.min.js:6
          Hide
          Marina Glancy added a comment -

          PS but it's the same on master and on 2.5

          Show
          Marina Glancy added a comment - PS but it's the same on master and on 2.5
          Hide
          Damyon Wiese added a comment -

          Yes - mymobile is getting deprecated (pushed to the plugins DB) - but if we have done something to break it we should try and fix it - (and any custom themes based on it).

          Show
          Damyon Wiese added a comment - Yes - mymobile is getting deprecated (pushed to the plugins DB) - but if we have done something to break it we should try and fix it - (and any custom themes based on it).
          Hide
          Jérôme Mouneyrac added a comment -

          I tried on Firefox the error message is better: [10:26:10.646] TypeError: M.core_completion is undefined @ http://jerome.moodle.local/m/integration_master/theme/jquery.php/core/jquery-1.10.2.min.js:9

          Show
          Jérôme Mouneyrac added a comment - I tried on Firefox the error message is better: [10:26:10.646] TypeError: M.core_completion is undefined @ http://jerome.moodle.local/m/integration_master/theme/jquery.php/core/jquery-1.10.2.min.js:9
          Hide
          Jérôme Mouneyrac added a comment -

          To reproduce:
          1- enable completion tracking, enable completion in the course
          2- have some activities and make them completed by the student
          Firefox:
          3- switch to mymobile theme. Go to the front page.
          4. click on the course, the loading icon freeze and the js error is displayed:

          Chrome
          3- switch to mymobile theme. Go to the front page.This js error is displayed:

          4- click on the course, the loading icon freeze, the error js is displayed:

          Uncaught TypeError: Cannot call method 'init' of undefined
          (anonymous function)
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e.Loader._finish yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          e.Loader._onSuccess yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          p yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          e.Loader._insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31
          (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32
          e.Loader._continue yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32
          e.Loader.insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32
          e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function)
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3
          (anonymous function)
          (anonymous function) jquery-1.10.2.min.js:4
          x.extend.globalEval jquery-1.10.2.min.js:4
          x.fn.extend.domManip jquery-1.10.2.min.js:5
          x.fn.extend.append jquery-1.10.2.min.js:5
          x.fn.(anonymous function) jquery-1.10.2.min.js:5
          $.ajax.success jquery.mobile-1.3.1.js:4366
          c jquery-1.10.2.min.js:4
          p.fireWith jquery-1.10.2.min.js:4
          k jquery-1.10.2.min.js:6
          r jquery-1.10.2.min.js:6

          Show
          Jérôme Mouneyrac added a comment - To reproduce: 1- enable completion tracking, enable completion in the course 2- have some activities and make them completed by the student Firefox: 3- switch to mymobile theme. Go to the front page. 4. click on the course, the loading icon freeze and the js error is displayed: [10:26:10.646] TypeError: M.core_completion is undefined @ http://jerome.moodle.local/m/integration_master/theme/jquery.php/core/jquery-1.10.2.min.js:9 Chrome 3- switch to mymobile theme. Go to the front page.This js error is displayed: GET http://jerome.moodle.local/m/integration_master/theme/jquery.php/core/jquery-1.10.2.min.map 404 (not found) 4- click on the course, the loading icon freeze, the error js is displayed: Uncaught TypeError: Cannot call method 'init' of undefined (anonymous function) e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e.Loader._finish yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 e.Loader._onSuccess yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 p yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 e.Loader._insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32 e.Loader._continue yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32 e.Loader.insert yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:32 e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e._notify yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 T yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e._use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 e.use yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:3 (anonymous function) (anonymous function) jquery-1.10.2.min.js:4 x.extend.globalEval jquery-1.10.2.min.js:4 x.fn.extend.domManip jquery-1.10.2.min.js:5 x.fn.extend.append jquery-1.10.2.min.js:5 x.fn.(anonymous function) jquery-1.10.2.min.js:5 $.ajax.success jquery.mobile-1.3.1.js:4366 c jquery-1.10.2.min.js:4 p.fireWith jquery-1.10.2.min.js:4 k jquery-1.10.2.min.js:6 r jquery-1.10.2.min.js:6
          Hide
          Jérôme Mouneyrac added a comment - - edited

          PS: I agree it's not a big deal on master as mymobile been removed but it needs to be fixed on 2.5 (and maybe others) as I tested on integration 2.5 and the regression exists. (not tested on 2.5 stable as master confirm it's a regression, not tested on 2.4/2.3, don't forget to check these version yoo.)

          Show
          Jérôme Mouneyrac added a comment - - edited PS: I agree it's not a big deal on master as mymobile been removed but it needs to be fixed on 2.5 (and maybe others) as I tested on integration 2.5 and the regression exists. (not tested on 2.5 stable as master confirm it's a regression, not tested on 2.4/2.3, don't forget to check these version yoo.)
          Hide
          Wiktor Wandachowicz added a comment -

          In my Moodle 2.5 installation I have an error in Google Chrome JS Console:

          GET http://ftims.edu.p.lodz.pl/theme/jquery.php/core/jquery.min.map 404 (not found)

          However, the following addres is valid:

          http://ftims.edu.p.lodz.pl/theme/jquery.php/core/jquery-1.9.1.min.js

          I have a custom theme for the site, so maybe that's a problem? If so, how to fix it?
          I mean, what is different from version 2.2 with regard to jQuery handling in themes?

          Show
          Wiktor Wandachowicz added a comment - In my Moodle 2.5 installation I have an error in Google Chrome JS Console: GET http://ftims.edu.p.lodz.pl/theme/jquery.php/core/jquery.min.map 404 (not found) However, the following addres is valid: http://ftims.edu.p.lodz.pl/theme/jquery.php/core/jquery-1.9.1.min.js I have a custom theme for the site, so maybe that's a problem? If so, how to fix it? I mean, what is different from version 2.2 with regard to jQuery handling in themes?
          Hide
          Gareth J Barnard added a comment - - edited

          Dear Wiktor Wandachowicz,

          That's a debugging map file and not essential, info on: http://blog.jquery.com/2013/01/09/jquery-1-9-rc1-and-migrate-rc1-released/#sourcemaps and if you want to get it for 1.9.1 and place it in the '/lib/jquery' folder where 'jquery.php' will find it you can get it from http://code.jquery.com/jquery-1.9.1.min.map and rename it. Perhaps it should be supplied in core, but that's a separate issue.

          To answer the second question, the difference between M2.2 and M2.5 is that in the latter, the use of jQuery is managed and in the former a 'free for all' with no strategy to be consistent or avoid conflicts.

          Gareth

          Show
          Gareth J Barnard added a comment - - edited Dear Wiktor Wandachowicz , That's a debugging map file and not essential, info on: http://blog.jquery.com/2013/01/09/jquery-1-9-rc1-and-migrate-rc1-released/#sourcemaps and if you want to get it for 1.9.1 and place it in the '/lib/jquery' folder where 'jquery.php' will find it you can get it from http://code.jquery.com/jquery-1.9.1.min.map and rename it. Perhaps it should be supplied in core, but that's a separate issue. To answer the second question, the difference between M2.2 and M2.5 is that in the latter, the use of jQuery is managed and in the former a 'free for all' with no strategy to be consistent or avoid conflicts. Gareth
          Hide
          Jason Fowler added a comment -

          getting the *.map error in chrome for 2.5 but not 2.4

          Haven't noticed the other errors at all.

          This file being something that is for debugging, it is not critical to have it, but it could be handy, so I will get the file and drop it in the right place.

          Show
          Jason Fowler added a comment - getting the *.map error in chrome for 2.5 but not 2.4 Haven't noticed the other errors at all. This file being something that is for debugging, it is not critical to have it, but it could be handy, so I will get the file and drop it in the right place.
          Hide
          Jason Fowler added a comment -

          I have managed to follow Gareth's suggestion and get rid of the issue.

          Show
          Jason Fowler added a comment - I have managed to follow Gareth's suggestion and get rid of the issue.
          Hide
          Andrew Nicols added a comment -

          I'm going to reject this change for the moment as it doesn't actually fix the issue for me.

          The sourcemap is optional and although it may warn in the JS console, it isn't an error. We should ideally ship the sourcemap too, but this belongs in a separate issue.

          The error I'm seeing is actually theme related and Gareth J Barnard or Mary Evans may have views on the most appropriate fix for this. This is the error originally reported by Jérôme Mouneyrac -

          Uncaught TypeError: Cannot call method 'all' of null

          I'm only seeing this error at present when I have editing enabled. Much of our recent JavaScript expects the page to have a containing div with id #page-content. When editing is enabled, much of the editing toolkit depends on this at present.

          I'm not seeing any error when the 'My private files' block is visible on the page, nor when I follow the activity completion instructions that Jérôme Mouneyrac provided.

          Show
          Andrew Nicols added a comment - I'm going to reject this change for the moment as it doesn't actually fix the issue for me. The sourcemap is optional and although it may warn in the JS console, it isn't an error. We should ideally ship the sourcemap too, but this belongs in a separate issue. The error I'm seeing is actually theme related and Gareth J Barnard or Mary Evans may have views on the most appropriate fix for this. This is the error originally reported by Jérôme Mouneyrac - Uncaught TypeError: Cannot call method 'all' of null I'm only seeing this error at present when I have editing enabled. Much of our recent JavaScript expects the page to have a containing div with id #page-content. When editing is enabled, much of the editing toolkit depends on this at present. I'm not seeing any error when the 'My private files' block is visible on the page, nor when I follow the activity completion instructions that Jérôme Mouneyrac provided.
          Hide
          Gareth J Barnard added a comment -

          Avast yee all, it bee talkin like a Pirate day!

          Yee believe thy see thee map to thy treasure tee shed thee light on thy issue.

          Ok, I'll stop talking like a pirate as that will take longer...

          Given Jérôme Mouneyrac's comment about not needing a fix for M2.4 reminded me that this issue is caused by the fact that jQuery was added in this way in MDL-15727 but no map file was included. Then in MDL-38650 I converted MyMobile to use the new jQuery inclusion functionality and also did not spot the need for the map file. So as this is really about having the map file for MDL-15727, therefore this fix should be for M2.6 too for anything that uses jQuery in general and not MyMobile specific, it's just that MDL-38650 has caused in this case the issue to be highlighted.

          So I believe that the patch should stand in general as it fixes the specific error:

          GET http://jerome.moodle.local/m/integration_master/theme/jquery.php/core/jquery-1.10.2.min.map 404 (not found) jerome.moodle.local/m/integration_master/:1
          

          But the error:

          Uncaught TypeError: Cannot call method 'all' of null
          

          is a separate issue related to MyMobile and as we are all wearing black arm bands for that theme then there is no point in fixing it. So I concur with thy shipmate Andrew Nicols when he states "The sourcemap is optional and although it may warn in the JS console, it isn't an error. We should ideally ship the sourcemap too, but this belongs in a separate issue.".

          Aye!

          Gareth

          Show
          Gareth J Barnard added a comment - Avast yee all, it bee talkin like a Pirate day! Yee believe thy see thee map to thy treasure tee shed thee light on thy issue. Ok, I'll stop talking like a pirate as that will take longer... Given Jérôme Mouneyrac 's comment about not needing a fix for M2.4 reminded me that this issue is caused by the fact that jQuery was added in this way in MDL-15727 but no map file was included. Then in MDL-38650 I converted MyMobile to use the new jQuery inclusion functionality and also did not spot the need for the map file. So as this is really about having the map file for MDL-15727 , therefore this fix should be for M2.6 too for anything that uses jQuery in general and not MyMobile specific, it's just that MDL-38650 has caused in this case the issue to be highlighted. So I believe that the patch should stand in general as it fixes the specific error: GET http: //jerome.moodle.local/m/integration_master/theme/jquery.php/core/jquery-1.10.2.min.map 404 (not found) jerome.moodle.local/m/integration_master/:1 But the error: Uncaught TypeError: Cannot call method 'all' of null is a separate issue related to MyMobile and as we are all wearing black arm bands for that theme then there is no point in fixing it. So I concur with thy shipmate Andrew Nicols when he states "The sourcemap is optional and although it may warn in the JS console, it isn't an error. We should ideally ship the sourcemap too, but this belongs in a separate issue.". Aye! Gareth
          Hide
          Jérôme Mouneyrac added a comment -

          Hi Gareth, I just said that I didn't check 2.4/2.3 (I didn't say to not fix them). Jason tested 2.4

          Show
          Jérôme Mouneyrac added a comment - Hi Gareth, I just said that I didn't check 2.4/2.3 (I didn't say to not fix them). Jason tested 2.4
          Hide
          Gareth J Barnard added a comment -

          Dear Jérôme Mouneyrac,

          Ok, avast yee no problem nay need get thee shipwright to fix thy M2.4 and thee M2.3.

          Captain Barnard.

          Show
          Gareth J Barnard added a comment - Dear Jérôme Mouneyrac , Ok, avast yee no problem nay need get thee shipwright to fix thy M2.4 and thee M2.3. Captain Barnard.
          Hide
          Mary Evans added a comment - - edited

          @Everybody,
          PLEASE NOTE: We are not obliged to fix 2.3 if it is not a security issue.

          @Andrew,
          If what you are saying is correct, and I have no reason to doubt it, then adding id="page-content" to theme/mymobile/layout/general.php should fix it.
           

           <!-- main content -->
          
          <div id="page-content" data-role="content" class="mymobilecontent" <?php echo $databodytheme; ?>>
          
          

          Yes?

          Cheers
          Mary

          Show
          Mary Evans added a comment - - edited @Everybody, PLEASE NOTE: We are not obliged to fix 2.3 if it is not a security issue. @Andrew, If what you are saying is correct, and I have no reason to doubt it, then adding id="page-content" to theme/mymobile/layout/general.php should fix it.   <!-- main content --> <div id= "page-content" data-role= "content" class= "mymobilecontent" <?php echo $databodytheme; ?>> Yes? Cheers Mary
          Hide
          Jason Fowler added a comment -

          Thanks for the extra details Andrew, I was just following the testing instructions, which explains why I didn't notice the error.

          Show
          Jason Fowler added a comment - Thanks for the extra details Andrew, I was just following the testing instructions, which explains why I didn't notice the error.
          Hide
          Nadav Kavalerchik added a comment -

          Just got the same error while using latest theme/essential (2013090400) with Moodle 2.5.2

          Adding the missing jquery file to lib/jquery, as suggested by Gareth J Barnard (see above comment) workedaround this issue.

          Show
          Nadav Kavalerchik added a comment - Just got the same error while using latest theme/essential (2013090400) with Moodle 2.5.2 Adding the missing jquery file to lib/jquery, as suggested by Gareth J Barnard ( see above comment ) workedaround this issue.
          Hide
          Jason Fowler added a comment -

          I think I will patch both problems here, as separate commits, but so that each issue is done and sorted in one move.

          Show
          Jason Fowler added a comment - I think I will patch both problems here, as separate commits, but so that each issue is done and sorted in one move.
          Hide
          Jason Fowler added a comment -

          adding id="page-conent" to that area wasn't enough to fix it Mary. will look in to this further.

          Show
          Jason Fowler added a comment - adding id="page-conent" to that area wasn't enough to fix it Mary. will look in to this further.
          Hide
          Jason Fowler added a comment -

          apparently, you have to spell content with two t's to get it to work... who knew right?

          With it spelled correctly, it just cascades to another error, which seems to have the same root cause - the layout for MyMobile was broken by the work done to make moodle bootstrap friendly. I will continue working on it until all these errors are patched.

          Show
          Jason Fowler added a comment - apparently, you have to spell content with two t's to get it to work... who knew right? With it spelled correctly, it just cascades to another error, which seems to have the same root cause - the layout for MyMobile was broken by the work done to make moodle bootstrap friendly. I will continue working on it until all these errors are patched.
          Hide
          Mary Evans added a comment -

          I am not surprised it did not work if this is how you spelled it???

          page-conent

          LOL

          Show
          Mary Evans added a comment - I am not surprised it did not work if this is how you spelled it??? page-conent LOL
          Hide
          Jason Fowler added a comment -

          I may need a spell checker on my IDE ... jussayin' ... Damyon has helped point me in the right direction for the next issue in the chain ...

          Show
          Jason Fowler added a comment - I may need a spell checker on my IDE ... jussayin' ... Damyon has helped point me in the right direction for the next issue in the chain ...
          Hide
          Jason Fowler added a comment -

          Okay, adding a "block-region" class to the same div element re-enables drag and drop in MyMobile, and eliminates all the javascript errors encountered in fixing this issue.

          Show
          Jason Fowler added a comment - Okay, adding a "block-region" class to the same div element re-enables drag and drop in MyMobile, and eliminates all the javascript errors encountered in fixing this issue.
          Hide
          Petr Škoda added a comment -

          hi, please remove the unrelated changes in theme/jquery.php file, thanks

          Show
          Petr Škoda added a comment - hi, please remove the unrelated changes in theme/jquery.php file, thanks
          Hide
          Jason Fowler added a comment -

          those changes were required to correctly address the map files. For some unknown reason they were 404'ing until I made those changes.

          Show
          Jason Fowler added a comment - those changes were required to correctly address the map files. For some unknown reason they were 404'ing until I made those changes.
          Hide
          Petr Škoda added a comment -

          I think the caching of the map files will not work properly because there are no version numbers in the file name, I guess it is going to break during the next upgrade.

          Show
          Petr Škoda added a comment - I think the caching of the map files will not work properly because there are no version numbers in the file name, I guess it is going to break during the next upgrade.
          Hide
          Jason Fowler added a comment -

          or do you mean the whitespace issues?

          Show
          Jason Fowler added a comment - or do you mean the whitespace issues?
          Hide
          Petr Škoda added a comment -

          yes, do not change whitespace and my double quotes

          Show
          Petr Škoda added a comment - yes, do not change whitespace and my double quotes
          Hide
          Jason Fowler added a comment -

          fine, Integrators, please ignore the first commit in the patch, apparently it isn't future proof, so it will have to be addressed in a different issue, as originally suggested by Andrew Nicols

          Show
          Jason Fowler added a comment - fine, Integrators, please ignore the first commit in the patch, apparently it isn't future proof, so it will have to be addressed in a different issue, as originally suggested by Andrew Nicols
          Hide
          Jason Fowler added a comment -

          why is it a problem changing from double quotes to single quotes? I thought single quotes was the preferred method anyway.

          Show
          Jason Fowler added a comment - why is it a problem changing from double quotes to single quotes? I thought single quotes was the preferred method anyway.
          Hide
          Petr Škoda added a comment -

          There are no strict coding style rules for quoting, except you are not allowed to change existing quotes if it is not related to your changes. Unrelated changes in patches are discouraged and may get your issues kicked out of integration easily.

          Anyway the min file seems to be coming from different jQuery version...

          Show
          Petr Škoda added a comment - There are no strict coding style rules for quoting, except you are not allowed to change existing quotes if it is not related to your changes. Unrelated changes in patches are discouraged and may get your issues kicked out of integration easily. Anyway the min file seems to be coming from different jQuery version...
          Hide
          Jason Fowler added a comment -

          that's fine, I've pulled the patch for that now ...

          Show
          Jason Fowler added a comment - that's fine, I've pulled the patch for that now ...
          Hide
          Jason Fowler added a comment -

          Also, the problem doesn't exist for 2.4 so this is a 2.5 only patch.

          Show
          Jason Fowler added a comment - Also, the problem doesn't exist for 2.4 so this is a 2.5 only patch.
          Hide
          Gareth J Barnard added a comment -

          Hi all,

          Whilst experimenting with jQuery in M2.4 I noticed I was getting the 404 for the map file and that this was preventing the HTML Editor from loading on labels etc. Putting it in worked. Just info for this tracker to justify it's need .

          Cheers,

          Gareth

          Show
          Gareth J Barnard added a comment - Hi all, Whilst experimenting with jQuery in M2.4 I noticed I was getting the 404 for the map file and that this was preventing the HTML Editor from loading on labels etc. Putting it in worked. Just info for this tracker to justify it's need . Cheers, Gareth
          Hide
          Jason Fowler added a comment -

          Hi all,

          The lack of map files shouldn't be preventing anything from functioning, as they don't actually contain any actionable script code. If they are really needed, another issue should be raised to add them in.

          Show
          Jason Fowler added a comment - Hi all, The lack of map files shouldn't be preventing anything from functioning, as they don't actually contain any actionable script code. If they are really needed, another issue should be raised to add them in.
          Hide
          Andrew Nicols added a comment -

          Looks right to me. Submitting for integration.

          Show
          Andrew Nicols added a comment - Looks right to me. Submitting for integration.
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Sam Hemelryk added a comment -

          Thanks Jason - this has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks Jason - this has been integrated now.
          Hide
          Jérôme Mouneyrac added a comment -

          I originally reported this issue when testing MDL-40931. I wrote the test instructions for them: https://tracker.moodle.org/browse/MDL-41352?focusedCommentId=241339&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-241339.
          I retested it is not fixed.

          Somehow we've been carried away The title of this issue has been changed and it seems to me the issue fixes something different now (it's not very clear to me what it is thought). The patch seems to be related to what Mary said: https://tracker.moodle.org/browse/MDL-41352?focusedCommentId=245384&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-245384

          Running the current issue test instructions:
          it works.

          So I'll rewrite the original issue which is not fixed

          Show
          Jérôme Mouneyrac added a comment - I originally reported this issue when testing MDL-40931 . I wrote the test instructions for them: https://tracker.moodle.org/browse/MDL-41352?focusedCommentId=241339&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-241339 . I retested it is not fixed. Somehow we've been carried away The title of this issue has been changed and it seems to me the issue fixes something different now (it's not very clear to me what it is thought). The patch seems to be related to what Mary said: https://tracker.moodle.org/browse/MDL-41352?focusedCommentId=245384&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-245384 Running the current issue test instructions: it works. So I'll rewrite the original issue which is not fixed
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yes, it's happening (somewhere in the French Polynesia, right now). And you did it, raising Moodle to new excellency levels.

          Or, if you prefer, yes, you fixed that boring issue.

          Thanks anyway! Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yes, it's happening (somewhere in the French Polynesia, right now). And you did it, raising Moodle to new excellency levels. Or, if you prefer, yes, you fixed that boring issue. Thanks anyway! Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Agile