If there is a view that uses AJAX as content within the mega menu and user interacts with AJAX components of the views (Like search, pager) page is reloaded.

Comments

demoshane’s picture

Priority: Normal » Major

I can confirm this. There seems to be lot of issues with AJAX views. For us pager seems to work but exposed filters using AJAX don't do anything.

Console shows the following error:
https://www.evernote.com/shard/s61/sh/581be1f4-ecba-4e3a-90b5-b7ec12c8c1...

Also: If megamenu has AJAX using view block, all other views on page using AJAX stop working or start to behave erradically (Reload page), instantly after disabling the megamenu block or removing AJAX using block from megamenu, other views are restored to working status.

Raising priority to major because currently this breaks views AJAX.

demoshane’s picture

Title: Views using AJAX reload the page » Views using AJAX break views on megamenu and outside of it.

Updated title

demoshane’s picture

Quick update: om_maximenu seems to be currently only megamenu solution not suffering from AJAX problems, maybe that could prove useful for troubleshooting.

gdarends’s picture

I also have an issue with a view using infinite scroll. The menu button on a "tablet" and below works fine.. until I scroll down and the infinite scroll kicks in and loads new content. Then the button stops functioning. It won't open or close, depending on which state it was in before the infinite scroll kicked in.

artem_sylchuk’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.87 KB

Hi guys!
I know that it is pretty old issue, but looks like it still exists. I've found a reason why ajax in views is broken: tb_megamenu for some reason invokes every block included into menu twice. This forces view to regenerate dom-id class and ajax command can't find proper wrapper element.

Attached patch adds static caching for the blocks and should eliminate above issue and improve performance a bit.

Parkes Design’s picture

Thanks James, I am currently having the above issue with TB megamenu and ajax in open atrium. I've found that as soon as you run an ajax process the menu starts working again. I'll check your patch. Thankyou.

Parkes Design’s picture

your patch isn't working for me James sorry.

quondam’s picture

Status: Needs review » Closed (outdated)

A number of updates and improvements have been made to the TB Mega Menu module since it was taken over by new maintainers in mid-2020. After reviewing this issue we've determined that it has either been fixed, is outdated, or represents a feature request that won't be implemented in the requested module version. Due to those findings we're closing the issue - but feel free to re-open if you determine that it's relevant after updating to the latest release of TB Mega Menu currently available for your installed version of Drupal.

kevster’s picture

First off many thanks for this great module..

I believe this is still an issue.

I am using drupal 7.78 and latest RC3 version of megamenu. I have noticed that on pages that have the fivestar voting widget added (uses AJAX) that the widget now defaults to a drop down select and not the ajax star icons.

If I hide the megamenu block then fivestar works as expected and displays the star icons for voting.

drupal 7.78
megamenu 7.x RC3
jquery_update 3.4

EDIT:
This module also knocks out responsive menus (7.1.7) which I use for my mobile menu. If I turn off the megamenu block then the mobile burger bar style menu works fine. I just get the whole mobile menu printed out so cant toggle menu open/closed

quondam’s picture

Version: 7.x-1.0-alpha4 » 7.x-1.0-rc3
Priority: Major » Normal
Status: Closed (outdated) » Needs work
knaffles’s picture

Kevster, would you mind testing the latest code in the 7.x-1.x-dev branch? We applied some fixes there related to Drupal behaviors which mightfix your issue as well. If not, let us know. You can find the dev branch here:

https://git.drupalcode.org/project/tb_megamenu/-/tree/7.x-1.x-dev

rbrownell’s picture

Status: Needs work » Closed (outdated)

Thanks for the report and for contributing to the TB Mega Menu issue queue.

Drupal 7 reached end of life on January 5, 2025 and is no longer supported going forward.

As part of wrapping up Drupal 7 support for this project, issues that do not include a code-based resolution (including issues where the only patch is out of date and requires a re-roll) are being closed as Outdated as part of this cleanup.

This closure reflects the end-of-life status of Drupal 7 and the absence of an up-to-date fix we can act on, not the validity of the issue itself.

If the issue applies to a currently supported version of Drupal, please open a new issue with updated details.

Thanks again to everyone who contributed during Drupal 7’s lifecycle.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.