Menus and tabs not working after upgrading to Moodle 3.4.1

Menus and tabs not working after upgrading to Moodle 3.4.1

by Ross Lovell -
Number of replies: 6

I've just upgraded from Moodle 3.4 to Moodle 3.4.1 (Build: 20180115). Now the edit cog menu, user menu, and tabs in the Site administration area no longer work. When I click on them nothing happens.

I've tested my site using a custom theme and the Boost theme using Google Chrome and Edge with the same results.

I'm not sure where to begin troubleshooting this any help would be much appreciated.

--Edit--

For the moment I've reverted back to Moodle 3.4+ (Build: 20171123). I'll test the update on my development server tomorrow to see if I can replicate this.

Average of ratings: -
In reply to Ross Lovell

Re: Menus and tabs not working after upgrading to Moodle 3.4.1

by Ross Lovell -

I've tried again today upgrading from Moodle 3.4+ (Build: 20171123) to Moodle 3.4.1+ (Build: 20180118) with the same results. Menu's tabs and even Moodle's navigation draw no longer work. When I click on them nothing happens.

I've tested this with the Boost theme using Chrome, Microsoft Edge, and FireFox all with the same results. If anyone has any advice it would be much appreciated as I'm unable to upgrade at the moment.

For the time being I'll revert back to Moodle 3.4 so that our students and teachers have a working system for tomorrow.

In reply to Ross Lovell

Re: Menus and tabs not working after upgrading to Moodle 3.4.1

by Kay Mo -

I had a similar issue when upgrading with the latest version 3.4.1. CSS styles were not working anymore.

in Firefox, I right-click and go to "inspect code" , tab style editor:

If there are any error there, all the styles are bugged.

In my case I had one error with this file:



moodle/theme/styles.php

It appears it was updated but also incorrectly set with permissions 664 instead of 644. That creates an internal server error!

I reversed the file permission back to 644 and it works now.

upgrade to 3.4.1 successful

I hope that helps


Average of ratings: Useful (2)
In reply to Kay Mo

Re: Menus and tabs not working after upgrading to Moodle 3.4.1

by Ross Lovell -

Hi Kay

Thank you for your help and sorry for not replying before now. Your fix got everything back up and running again.

In reply to Ross Lovell

Re: Menus and tabs not working after upgrading to Moodle 3.4.1

by Ross Lovell -

I’ve just upgraded from Moodle 3.3 (on my dev server) to Moodle 3.5+ (Build: 20180621) and encountered a similar issue to my previous one. None of the widgets (user menu, edit menus, sidebar toggle, Bootstrap collapses, etc) are working. I’ve tested this using the Boost theme with no modifications to make sure it wasn’t an issue with my child theme.

I tried to turn on Debugging in Moodle and clear the Moodle’s caches but none of the tabs in the Site administration area are working.

After testing in different web browsers I opened my browsers Developer Tools and found the below errors:

Uncaught sytaxError or unexpected token - first.js:1

Uncaught Error: No define call for core/first - require.min.js:1
http://requirejs.org/docs/errors.html#nodefine
  at makeError (require.min.js:1)
  at Object.completeLoad (require.min.js:1)
  at HTMLScriptElement.onScriptLoad (require.min.js:1)
makeError            @   require.min.js:1
completeLoad         @   require.min.js:1
onScriptLoad         @   require.min.js:1
load (async)
req.load             @   require.min.js:1
load                 @   require.min.js:1
load                 @   require.min.js:1
fetch                @   require.min.js:1
check                @   require.min.js:1
enable               @   require.min.js:1
enable               @   require.min.js:1
(anonymous)          @   require.min.js:1
(anonymous)          @   require.min.js:1
each                 @   require.min.js:1
enable               @   require.min.js:1
init                 @   require.min.js:1
(anonymous)          @   require.min.js:1
setTimeout (async)
req.nextTick         @   require.min.js:1
o                    @   require.min.js:1
requirejs            @   require.min.js:1
(anonymous)          @   view.php?id=25:639


I also decided to take a look at my Moodle install using the Firefox Developer Tools and received a different error message:

SyntaxError: illegal character[Learn More] first.js:1

Error: No define call for core/first
http://requirejs.org/docs/errors.html#nodefine require.min.js:1:1067
makeError http://ubuntu-dev/moodle-dev/lib/javascript.php/1530258227/lib/requirejs/require.min.js:1:1067
completeLoad http://ubuntu-dev/moodle-dev/lib/javascript.php/1530258227/lib/requirejs/require.min.js:1:12223
onScriptLoad http://ubuntu-dev/moodle-dev/lib/javascript.php/1530258227/lib/requirejs/require.min.js:1:13014

Learn More link.

I’m not really sure where to go from here. Any advice or assistance would be much appreciated.

System details

Moodle 3.5+ (Build: 20180621)
Ubuntu Server 16.04.4 LTS
PHP Version 7.0.30
Apache Version Apache/2.4.18 (Ubuntu)

In reply to Ross Lovell

Re: Menus and tabs not working after upgrading to Moodle 3.4.1

by Ross Lovell -

I decided to start with a fresh install of Moodle 3.5 (not Moodle 3.5+) to see if this would make a difference.

Everything was fine up to setting up administrator account. When prompted to "Click to enter text" for a new password nothing happened when I clicked the text.

When I checked the Console in Firefox's web developer tools I found the same errors as above.

I can see that it might be a problem with moodle/lib/javascript.php and requirejs but I'm unsure of how to fix the issue.

In reply to Ross Lovell

Re: Menus and tabs not working after upgrading to Moodle 3.4.1

by Paul Roberts -

I know this is an old post, but I observed identical symptoms and this was one of the few results that Google found, so I wanted to share my experience.

In my case, the issue was caused by junk metadata stored in Mac OS resource forks related to the quarantine feature of Mac OS. When I packed up the Moodle directory for upload to the webserver with the tar command, the metadata was split into separate hidden files, and that metadata somehow ended up interspersed in some dynamically generated JavaScript. The solution is to create a clean tarball with the metadata stripped out. The way I did this was to tar the directory from within a Linux virtual machine running in Parallels.

Another option is to set an environment variable before you tar up the directory, as explained here:

https://superuser.com/questions/259703/get-mac-tar-to-stop-putting-filenames-in-tar-archives

Although I haven’t tested that method yet.

Anyway, I hope that helps someone suffering from phantom metadata in their JavaScript.