File Manager not working in Snap Theme

File Manager not working in Snap Theme

by Yew Zhi Yong -
Number of replies: 6


When the Snap theme is enabled, the file manager does not display, and drag and drop does not work. This issue does not occur when using the default Boost theme. It occurs on my production server and can be replicated in a local machine after a fresh install (with no plugins besides the theme). 

Loading file manager

Moodle version: 3.9.1+ (Build: 20200730)

Snap version: 3.8.3 (2020061102)

Errors from Chrome Dev Tools: 

Uncaught TypeError: Cannot read property 'on' of null
    at FileManagerHelper.setup_buttons (filemanager.js:28)
    at FileManagerHelper.initializer (filemanager.js:6)
    at FileManagerHelper._initHierarchy (yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279)
    at FileManagerHelper._baseInit (yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279)
    at FileManagerHelper.init (yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:311)
    at FileManagerHelper._initBase (yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279)
    at FileManagerHelper.v (yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:279)
    at FileManagerHelper.o (yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:319)
    at new FileManagerHelper (filemanager.js:2)
    at Object.M.form_filemanager.init (filemanager.js:98)

Related issues and discussions: 

https://tracker.moodle.org/browse/MDL-69172?focusedCommentId=805784&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel

https://moodle.org/mod/forum/discuss.php?d=406446#p1640841

https://moodle.org/mod/forum/discuss.php?d=405688

https://moodle.org/mod/forum/discuss.php?d=236743

Average of ratings: -
In reply to Yew Zhi Yong

Re: File Manager not working in Snap Theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
There is currently no Moodle3.9 version of Snap in the plugins database, so I would suggest reporting this as a development request on their git issues page.
In reply to Yew Zhi Yong

Re: File Manager not working in Snap Theme

by Yew Zhi Yong -
For anyone facing this issue, I found a temporary workaround.

Go to /theme/snap/templates/core and rename filemanager_page_generallayout.mustache to filemanager_page_generallayout.mustache.old or any other name. This would allow moodle to fallback to the boost file manager.
In reply to Yew Zhi Yong

Re: File Manager not working in Snap Theme

by Alex Vallejo -


The proposed solution works correctly, thanks

In reply to Yew Zhi Yong

Re: File Manager not working in Snap Theme

by Lorne Cooke -

I am getting exactly the same error, line for line, as you did. I am getting this sequence of lines using Firefox here at home and Chrome at work. I have switched between Boost, Classic and Fordson. The difficulties have only appeared since a recent upgrade to Moodle 3.10 about 12 days ago. I havent found much reference to this issue, except in this thread. Hopefully there is a solution.

In reply to Lorne Cooke

Re: File Manager not working in Snap Theme

by Yew Zhi Yong -
Hi @Lorne, unfortunately I am unable to give you a solution as I'm not using this theme anymore. However, there is some new activity recently on the relevant github issue. Perhaps you can gleam some information over there, or provide more details to the developers directly by replying to that particular issue:
https://github.com/open-lms-open-source/moodle-theme_snap/issues/179