Menu Tree not expanding in 2.6.8

Menu Tree not expanding in 2.6.8

by Stephen Wallace -
Number of replies: 35

Hello!


I have installed the most current version of 2.6.8 on our server and everything is working fine, except the fact that the menu tree does not expand on any browser for Mac and Windows. I get the following javascript error:


TypeError: undefined is not an object (evaluating 'M.block_navigation.init_add_tree')


Any suggestions on how to fix this. I haven't found any solution thus far and have already put in several hours trying to research and fix this. Two screenshots attached.


Thanks,


Stephen

Attachment Screen Shot 2015-02-22 at 9.32.47 AM.png
Attachment Screen Shot 2015-02-22 at 9.32.56 AM.png
Average of ratings: -
In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -
Is there a better place to post this? Not sure what could be causing this error.


Stephen

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

No, this is a good place to post this question. have you tried purging your cache i.e.

/admin/purgecaches.php



In reply to Marcus Green

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

Hello,

I tired purging all caches, the theme cache and switching between themes. Still no go. When I disable javascript, the menu opens up completely and works fine for accessing the options but need to get the tree to work.

Any other thoughts? I have reinstalled Moodle twice and still get the same problem.


Stephen

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -
Hello again,


I installed an older version 2.5.9 and this also doesn't allow me to expand the menu tree. What could be causing this? Something on my server? I have the more than the base requirements for PHP and mySQL. (5.2, 5.5) I believe.

Any other suggestions?

Thanks,

Stephen

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

Forget it! I've wasted too many hours looking into a solution for this install of Moodle and it has me completed frustrated. I'm dumping it... Sorry, just can't waste more time on it. Was hoping it would work for us.

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

If you think it was an upgrade issue, why not reinstall the moodle core? I did this for my site in about 30 min.

In reply to Steven Swanson

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

It wasn't on an upgrade is the funny thing. I tried 2.6.8 since this is what my server was able to meet with the requirements for installation. But then I ran into these errors with the menu tree. I reinstalled 2.6.8 to no avail. I thought I would try an earlier version, so I installed 2.5.9 to see if trying that version would work. Still the tree would not expand. I get these javascript errors and not sure how to resolve them. I have tried on multiple browsers and OS. Nothing has worked. Not sure if there is something at the server level not done properly. But I can't find sufficient instances of this error to troubleshoot. Hence, the frustration. I'd like to use Moodle but not sure what could be causing these errors.

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Torsten Händler -
which theme do you use`? I will install Moodle on my server 2.5.9 and 2.6.8 on my server an check it, but I think it could be a server Problem, Have you activate ajax in site-administration->appearance-> ajax and javascript?`


what settings do you have there?

In reply to Torsten Händler

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

Yes, the AJAX is enabled. I think I've tried every setting in the admin to see if something would make a difference. I've purged caches, reinstalled, dumped theme caches, etc. Nothing has changed.

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

Yes, it sounds like your server is not configured properly.

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

Please try this for me! Log into your account. Then in your URL put http://yourmoodlesite/admin/environment.php. Then take a screen show of all of the environment checks. I would like to see if you're missing something on your server.

In reply to Steven Swanson

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

I'm hoping it is something simple. Here is the graphic from the environment screen:

List of environment variables

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -
Looks like you have the most necessary items installed.
I've used and installed Moodle many times and never seen this issue.  Here are some things I would do to try to fix it:

1.) reboot your server (not sure what type of server you are using)
2.) update/upgrade your server
3.) Reinstall Moodle using GIT.
3)(contintued) If you unzipped the Moodle download folder before putting it on your server, Then don't do that again. Put the zip or tgz folder on your server and unzip it there. There are tens of thousands of files and it will increase the chance of corruption.(thats not a Moodle thing, that is for any large system of files).

FYI i've install version 2.5, 2.6, and 2.7 at least 2 dozen times on all kinds of servers (even shared servers) and it always works. I hope I wasn't just lucky. What kind of server do you have your site installed on?
In reply to Steven Swanson

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

I'm going to try and do a reboot now to the server and see what happens. It's a Linux shared hosting server. I downloaded the file from moodle.org. Do you think I should download it from GIT instead? I did decompress via the server rather than from my computer. I used the tgz version. When I did the reinstall, I downloaded it from the same site, the same file. If the server reboot doesn't work, what do you think I should do then?

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

Since you have the same problem on two different versions. I don't think GIT would help. Must be a problem with the server. Either configuration or otherwise. Maybe a reboot or upgrade could solve it. 

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

If the reboot didn't work, and upgrading your server doesn't work. I don't know what to do next. If it was me I would use a different server. I've used a 4gb Ram server that was intended for minecraft and it worked great ( I did it because it was really cheap. It was a VPS for about $20 a month). I currently only use Amazon EC2 servers with Ubuntu 64bit. They work awesome and they are really cheap. I have 4 servers on there and I haven't gone over $20 for a month's bill.

In reply to Steven Swanson

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

I am currently waiting to hear back form the hosting company regarding the reboot to see if that will get it working. What service provides the amazon servers?

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Just H -

That would be Amazon smile

In reply to Just H

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

Does Amazon have bots cruising forums looking for grammatical errors now? haha!

In reply to Steven Swanson

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

I tried disabling the slasharguments option and the issue persists. You can see how frustrating this has been getting for me!

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

I would be very frustrated too! However, I've never seen that problem and I really believe it lies with your server. I would consider changing it. What are you using the server for? How many users do you expect? I use Amazon EC2 servers. http://aws.amazon.com/ec2/

Those servers are great, but it did take me some time to master how to use them. I was really used to VPS which are sort of canned and ready to go.  Let me know that answer to those questions I just asked so I could maybe point you into the right direction for a good server. I assure that once you get on a decent server it will work fine.


steve

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Steven Swanson -

Sorry for the endless messages, but I think I found your problem! If reboot did not work. Log in as admin. Then in address bar http://yourmoodlesite/admin/settings.php?section=http 

You will see a "use slash arguments" this is enable by default. Disable it. That should solve your problem! Found it in a forum search.

In reply to Steven Swanson

Re: Menu Tree not expanding in 2.6.8

by Just H -

Sadly I'm not a bot nor do I work for Amazon smile But I was answering the question "What service provides the amazon servers?"

In reply to Just H

Re: Menu Tree not expanding in 2.6.8

by ryan sanders -

have you cleared your cache in your web browser? and also have you tried another web browser?   have you tried disabling any firewall software / ad blockers, etc... on client computer / browser?  have you restart your computer. not server, but computer ya using to look at moodle? have you tried another computer to log into moodle and see if you get same issues?

with different installs did you use a different "database"? (different username/password/location) 

are you waiting for a few minutes for the initial download of the javascript file?  first time going to a moodle site. it can take a little bit of time for all the css files and javascript files to download. once downloaded, everything speeds right on up instantly nearly. 

have you tried going into a course (editing teacher or higher role) and "turned on editing" and re-ordered some activities via drag and drop,  or used drag and drop file upload. or created a new activity /resource or edit an exisiting one. and see if the various additional menus on the settings pages would collaspe / expand?  ((other words are you sure it just not menu, and not other javascript actions within moodle))

have you just created your webhosting account?  it can take up to 24 hours or some crud most hosting companies state. for things to get updated. and some times it does take that much time for things to work themselves out correctly. 


In reply to ryan sanders

Re: Menu Tree not expanding in 2.6.8

by Stephen Wallace -

Thanks for responding. Here is what I have done so far...

- Cleared cache in web browser: YES

- Third browser on different machines: YES

- Firewall and Ad Blockers disabled: YES

- Restart: YES

- Another computer to login: YES

- Different install: I did use the same name after deleting it and recreating it.

- I am unable to add an activity or resource. When I select the resource or activity from the drop down menu, it appears but nothing happens.

- Just created hosting account: No, I've had this account for years.

What do you suggest?

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.6.8

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Try turning on debug display by adding to the following to config.php


$CFG->debugdisplay = 1;

$CFG->debug = E_ALL & ~E_NOTICE;

This is really about showing information about PHP, but the issue with your Javascript is probably coming from an issue within PHP.


(Take these lines out of config.php once you are finished testing/have solved problem)

In reply to Marcus Green

Re: Menu Tree not expanding in 2.6.8

by ryan sanders -

*points to Marcus Green post to do first* 

i am just tacking on a couple questions out of my own curiosity.

you are not using any third party plugins, or customized themes?  you have not actually went in and tried to modify any javascript within moodle? 

you have correct file permissions via FTP for www.yoursite.com/moodle.   and for moodledata folder that sits outside of root www or like folder on amazon servers? docs.moodle.org i do believe covers this more in depth. you may need to search for the information. 

In reply to ryan sanders

Re: Menu Tree not expanding in 2.8.5

by Daniel meanock -

Hi i have exactly the same isssue after update :S

Ran moodle for 12 months no issue on 2.6.7 now have this nightmare.. any solutions guys?

Thanks

In reply to Daniel meanock

Re: Menu Tree not expanding in 2.8.5

by Stephen Wallace -

I tried until I was blue in the face and didn't find any solution on my current server. I figured it had to be some setting on my server since it wasn't a widespread issue. I was int he market for changing servers anyhow. I did and installed 2.8 and everything worked just fine. Not a solution for your case but this is what I had to do since I had already spent a considerable amount of time trying to fix it to no avail. I hope you have better luck.

Regards,

Stephen

In reply to Stephen Wallace

Re: Menu Tree not expanding in 2.8.5

by Daniel meanock -

Hi thanks for your reply,

Well i am stumped too this is stupid!  ok so i was thinking server issue maybe firewall but....

I created a new subdomain on same server/domain and installed a fresh copy of moodle 2.8.5 - no issues with menu,

So i copied over the files from my problem site - altered the config to the "new" test subdomain and used current moodle data... no issues whatever still


So now i plan to delete whole install, install fresh copy of moodle 2.8.5 drag and drop all files back in via ftp.. now the only thing is then i will have warnings about 15 or so plugins that will require updating so i will do them one at a time and between each one i will check the menus to ensure its not a plugin causing issue ...

but then i will have to completely reset all my theme back up etc.. a lot of unnecessary hours... absolutely ridiculous .

Will post when its done fingers crossed! smile


Thanks mate

In reply to Daniel meanock

Re: Menu Tree not expanding in 2.8.5

by Daniel meanock -

Sorted this now , fresh install did it -_- would still love to know the cause.  Closest i got was a php server issue! but then curious as to how it doesn't affect a fresh install


Thanks anyways smile