Logout menu does not work in mobile view

Issue #608 resolved
Paula Higgins created an issue

Hello, everyone! I wanted to report this issue because I read some people is having the same problem in the forum but I didn't see it here. The problem is that when we try to logout from our site, the drop-down menu in the upper-right corner doesn't work out at all. In addition to that, a # mark appears at the end of the link in which we are positioned. I'm running Moodle 3.2.1+, Adaptable and like the rest of the users with this problem I tried different browsers.

Considering that the logout option is also related to the security of my website, I was wondering if you're releasing a fix for this problem. Thanks for reading!

Comments (14)

  1. Nelson Bartley

    Is there any chance this could be pushed to the public repo in the near future? We are in pretty desperate need of this fix.

    Also, is there any chance that the User Menu not working in mobile view is related to the Navbar Tool/Custom Menu drop down not working as well?

  2. Nelson Bartley

    So, I have found a work around (which is not pretty at all but does the job) for Moodle 3.2.1+.

    If you look for d=d&&/#/.test(d)&&d.replace(/.(?=#[^\s]$)/,"") in bootstrapebase\amd\build\bootstrap.min.js and change to d=d&&/#[A-Za-z]/.test(d)&&d.replace(/.(?=#[^\s]$)/,"")

    The issue will go away. Technically, that is changing the following line in getParent($this) selector = selector && /#/.test(selector) && selector.replace(/.(?=#[^\s]$)/, '') //strip for ie7 to selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.(?=#[^\s]$)/, '') // strip for ie7

    This change was stolen from bootstrap 3.3.7 dropdown code and seems to do the trick.

    Hopefully there is a way to make this change without editing a core moodle install file though.

  3. Jeremy Hopkins

    Elsewhere we have discussed moving to using the core Moodle user menu to resolve the "switch role to" issue. I beleive that if we do that this issue would also be resolved?

    Although there are some benefits to retaining our own user menu it seems to be causing a lot of issues and think we should move to using the standard Moodle user menu.

  4. Nelson Bartley

    Jeremy, this is affecting all menus though. Logout is just one example. Tools/My Course also fails to work currently without my patch.

  5. Jeremy Hopkins

    Thanks for the clarification, I noticed those other menus were not working in 3.2, I am hoping we will be able to get this fixed soon.

  6. Jeremy Hopkins

    Having re-written the Adaptable user menu to handle switch role etc I am reluctent to completely replace this as we have more control over styling it and are able to add more options to the menu than the core Moodle user menu.

    That said it has caused problems before and the core user menu would keep us out of trouble in future.

    My suggestion would be to see how difficult it is to add the core menu as an option so that, should the need ever arise (as it has here) admins can switch over to that menu should they need to.

    I think it maybe a few weeks before the adaptable menus are sorted out, adding the option to show the core menu is the only short term fix I can see.

    I would like to know Fernandos thoughts on this.

  7. Log in to comment