Closed (outdated)
Project:
Responsive and off-canvas menu
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
19 Mar 2015 at 16:52 UTC
Updated:
9 Mar 2021 at 15:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nishant_k commentedPlease let me know if i can enable that from somewhere within the code or using hooks
Comment #2
lucian.ilea commentedHi!
I have this problem also. The mobile works fine on all pages, except the "create node" ones. I have a few of these exposed for the anonymous user.
I am using the dev version (also tried the other one).
Thank you!
Comment #3
jphelan commentedThis patch includes:
Comment #4
nitrocad commentedIt is still not working on admin pages, and the written patch is for the verison 7.x.1.x
Comment #5
tanc@nitrocad this module was designed to provide a responsive menu on the front end of a site. But I've uploaded a basic patch which will allow it to work on admin pages. I'm not sure I'll commit it though, unless there is a compelling user story for it.
Comment #6
tancComment #7
nitrocad commentedMany thanks for the adaptation. :)
Comment #8
kthull+1 for the patch in #5. I also maintain a site that needs this on the node add forms.
Comment #9
rroose commentedCan this also be patched (brought into) the Drupal 8 version of this module?
Comment #10
keshavv commentedI have problem, when user edit their Profile responsive menu not shown.
How to fix this
Comment #11
keshavv commentedI have added patch that restrict menu from admin pages using Role .
Comment #12
keshavv commentedComment #13
keshavv commentedRevised Patch
Comment #14
tancI'm considering a solution as follows:
Allowing the code to run on admin pages means that the javascript libraries and the page wrapping elements will be added to all admin pages which may have undesirable effects on the theme. But this would then be the site builders choice rather than having no choice.
Will look at implementing this on 8.x-2.x first and then backport if successful.
Comment #15
rajeevgoleThanks for the solution, Tanc!
I am working on making the patch.
Comment #16
rajeevgoleComment #17
rajeevgoleComment #18
tancThanks for the patch rajeevgole! Unfortunately the issue is slightly more complex and I'm working on something at the moment that should solve both this issue and the issue of page wrapper divs on themes like Bootstrap as well as the Seven theme. Currently if the mmenu javascript is enabled on admin pages the layout breaks due to the lack of a wrapping div.
So we don't double up on work I'll take this from here, but thank you for your efforts, I'll be sure to credit you.
Comment #19
tancOk, this turned out to be a bit more epic than anticipated. The complexity is around Drupal considering node/add and node/edit pages to admin pages. So rather than using the solution offered in #2854137: When admin routes are displayed as normal pages: script does not kick in. I thought it might be best to check whether the current page is using the admin theme or not. This way its connected to the theme rather than is_admin which allows more flexibility out of the box. I've then added a checkbox to allow a site administrator to choose whether they also want mmenu on their admin theme (default is disabled).
I also decided to add optional theme wrappers for the default theme and the admin theme. This is to get around some trouble with themes that don't have a wrapping div around all their regions (like Bootstrap, Seven etc). These are disabled by default.
Finally I discovered and fixed rendering issue introduced in version 2.5 when viewing the admin theme. This is related to preprocessing the toolbar without properly checking whether this theme should be modified.
So hopefully with these changes we have the most flexibility and the best freshly installed defaults. It would be great if someone can test the various options and let me know if this is ok to commit?
Comment #21
tancI decided to commit this patch and push the update. Now needs backport to 7.
Comment #22
tancComment #23
HitbyHi tanc,
has there been any progress for 7.x-2.x-dev to fix this issue. I've only just come across it on the node/add pages some users have access to on a site I'm working on.
Thanks,
Comment #24
tancI'm afraid not. Its unlikely I'll have time and Drupal 7 sites are a low priority for me. Feel free to submit a patch if you're able to.
Comment #25
tancNo new features for D7 version so closing as outdated
Comment #26
miguelbraga commentedNumber #5 solved my issue if someone is looking for an answer.
My problem was with node edit, the menu just went wild (looked like it lost CSS) and no errors on console.
My use case is with some nodes that need "editor" review - I created a role that gives edit permissions to a content type that requires regular input. The fact that the main menu wasn't visible and funcional in the edit page confused a lot of users and looked terrible.