gjb2048 / moodle-theme_shoehorn

Shoehorn theme for Moodle with the underlying Bootstrap v3 theme.
Other
3 stars 6 forks source link

Javascript in navigation menu broken #14

Closed hartmut1s closed 8 years ago

hartmut1s commented 8 years ago

Hi Gareth,

I continued testing your theme Shoehorn (version 3.0.0.3). Yesterday afternoon I realized that the navigation menu at the top is no longer functioning. Today I found out how to search for Javascript errors in Console. Here is what I got from my test side:

Uncaught ReferenceError: $ is not defined DrawingBoard.Control.extend @ first.js:21 (anonymous function) @ first.js:21

Uncaught TypeError: Cannot read property 'extend' of undefined DrawingBoard.Control.extend @ bootstrap.js:21 (anonymous function) @ bootstrap.js:21

Uncaught Error: No define call for theme_shoehorn/bootstrap http://requirejs.org/docs/errors.html#nodefine B @ require.min.js:12 h.completeLoad @ require.min.js:27 h.onScriptLoad @ require.min.js:27

Uncaught TypeError: Cannot read property 'extend' of undefined DrawingBoard.Control.extend @ anti_gravity.js:21 (anonymous function) @ anti_gravity.js:21

Uncaught Error: No define call for theme_shoehorn/anti_gravity http://requirejs.org/docs/errors.html#nodefine B @ require.min.js:12 h.completeLoad @ require.min.js:27 h.onScriptLoad @ require.min.js:27

Uncaught TypeError: Cannot read property 'extend' of undefined DrawingBoard.Control.extend @ fitvids.js:21 (anonymous function) @ fitvids.js:21 Uncaught Error: No define call for theme_shoehorn/fitvids http://requirejs.org/docs/errors.html#nodefine B @ require.min.js:12 h.completeLoad @ require.min.js:27 h.onScriptLoad @ require.min.js:27

console javascript error for navigation menu

With kind regards, Hartmut

gjb2048 commented 8 years ago

Hi Hartmut,

Thank you for testing. I have updated that version late yesterday.

Those errors are difficult to debug, I'll check on my system. Do you have any other plugins on that site? Do any errors show in the console for Clean?

Cheers,

Gareth

hartmut1s commented 8 years ago

Hi Gareth,

Thanks for your reply. I installed the latest version of Shoehorn from Github, but the navigation menu is still not working. Then I switched the theme to Clean. This is the error message I got: console - clean error messages

Yes, I have installed many plugins as I am testing them with Moodle 3.0. I also remember that I had no problems with the navigation menu right after the clean installation of Moodle 3.0 and Shoehorn (no additional plugins installed). Below is the link to a PDF with all additional plugins: https://www.dropbox.com/s/su34e16tjvo2jnp/plugins%20in%20M3.0.pdf?dl=0

As soon as Moodle 3.0.1 is released, I want to install it in a test site. Then, I probably need to install the plugins one by one and test when the navigation menu stops working.

With kind regards, Hartmut

gjb2048 commented 8 years ago

Hi Hartmut,

Thanks for the information.

If it is broken in Clean in the same way, then there is an issue with the core installation. The dollar symbol in this context represents jQuery. Is the site public?

Cheers,

Gareth

gjb2048 commented 8 years ago

Cannot replicate. My gut says that debugging the first error by clicking on it will tell you the script that is breaking jQuery.

i.e. first.js line 21.

hartmut1s commented 8 years ago

Hi Gareth,

It's a local installation of Moodle 3.0. The first line of the error message in Clean theme is: Uncaught ReferenceError: $ is not defined /moodle/lib/requirejs.php/1450612901/core/first.js

The next line of the error message has to do with this file: /moodle/lib/requirejs.php/1450612901/theme_bootstrapbase/bootstrap.js

And the last line about theme_bootstrapbase/bootstrap has to do with this file: moodle/lib/javascript.php/1450612901/lib/requirejs/require.min.js

It's late here and I need some rest. Hope to respond tomorrow morning. With kind regards, Hartmut

gjb2048 commented 8 years ago

Hi Hartmut,

No worries. When you next look at this, click on the line link in the error:

Uncaught ReferenceError: $ is not defined /moodle/lib/requirejs.php/1450612901/core/first.js

and it will take you to the code that is causing the issue. That should shed some light on it.

Cheers,

Gareth

hartmut1s commented 8 years ago

Hi Gareth,

Here is the link to a folder in my Dropbox. You will see the Javascript file "first" with line 21 and then the complete Javascript file "first." https://www.dropbox.com/sh/jhhpsy2pwr820mq/AAAYARQtqq9Ppver8ugwNmepa?dl=0

With kind regards, Hartmut

gjb2048 commented 8 years ago

Hi Hartmut,

Interestingly, line 21 is for 'filter_poodll/utils_amd' and: https://github.com/justinhunt/moodle-filter_poodll/commit/7b593acc68a18d062d7050e8298c6f8dcd25eeb3

Therefore the Poodll filter is the issue and will be fixed.

Cheers,

Gareth

gjb2048 commented 8 years ago

Hi Hartmut,

Been chatting to Justin and he's updated the filter on Moodle.org, so try the new version please.

Cheers,

Gareth

hartmut1s commented 8 years ago

Hi Gareth,

I really appreciate what you have been doing. Thanks a lot. I removed the lines from the poodll filter, but the navigation menu is not yet working. It is still line 21 in "First.js". console - clean error messages update dec 21

clean - console line 21

With kind regards, Hartmut

gjb2048 commented 8 years ago

Hi Hartmut,

Drawingboard.js has an error and has been removed from the Poodll filter, please upgrade it and if it still fails, do a Purge all caches.

G

hartmut1s commented 8 years ago

Hi Gareth,

The navigation menu works again. This is great! Downloading and installing the latest poodll filter helped to solve this problem. Thanks a lot for solving this issue.

With kind regards, Hartmut