Skip to content

dropdown menu doesn't work anymore #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
flth opened this issue Jan 15, 2019 · 13 comments
Closed

dropdown menu doesn't work anymore #31

flth opened this issue Jan 15, 2019 · 13 comments
Labels
Milestone

Comments

@flth
Copy link

flth commented Jan 15, 2019

Seems with WP 5.0.3 there is a bug that dropdown (sub menus) doesn't work anymore. Clicking on an entry doesn't do anything. Reason unknown for me

@ve3
Copy link
Contributor

ve3 commented Jan 15, 2019

This is because of the bug in Bootstrap 4.2.1 not from other.

From that issue, please see examples from these links.

  1. https://codepen.io/anon/pen/oJZKXW Drop down works.
  2. https://codepen.io/anon/pen/BvWXNO Drop down doesn't work.

To hot fix in your website, please add custom menu as dropdown parent menu and use # as link and keep sub menu no change.

This bug will be fixed once Bootstrap 4.3 released as seen in issue's project described that shipped in v4.3.

If Bootstrap 4.3 released, I will update this theme and release as soon as possible.
So, I will keep "this" issue open and make a comment again once the theme released.

@ve3 ve3 added the bug label Jan 15, 2019
@ve3 ve3 added this to the 1.3 milestone Jan 15, 2019
@flth
Copy link
Author

flth commented Jan 15, 2019

Hello, thanks for the very fast reply.. I've read the bug at BS, I've checked the examples, I've done that hotfix. The code looks like it should (href="#"), but it still doesn't work. Very puzzled

@ve3
Copy link
Contributor

ve3 commented Jan 15, 2019

Please take a look at my screenshot.
Screenshot-2019-01-15-Menus-rundiz-Word-Press.png
And here is my website front-end result. https://rundiz.com/

Make sure that you use Custom Link with # as URL for parent menu that contain dropdown.

If your site use any cache, please clear all the cache first and then CTRL+F5 to force reload front page (without cache).
Please also verify that you are not using any menu plugins or else this maybe unable to fix.

I hope that this will be helped, please tell me again if it is working or not.

@flth
Copy link
Author

flth commented Jan 15, 2019

hi, yes exactly what I did, I've checked the frontend and it is correct in the syntax, still doesn't work. Disabled Cache and tried also Chrome...
https://abload.de/img/screenfgj53.png
really no idea what is wrong, before WP 5.0.3 it was working

@ve3
Copy link
Contributor

ve3 commented Jan 15, 2019

That is really strange because all my local and online WordPress using this theme can fix with this.

If all the parent menu that contain dropdown is already custom menu and still not working, I recommend you to roll back to use Bootstrap Basic 1.2 instead and skip or disable update for this theme until I release the new version.

Sorry for the inconvenient and I hope that BB1.2 is still working fine.

@coliff
Copy link
Member

coliff commented Jan 15, 2019

I ran in to this issue too and it took me a long time to work out how to fix. In the end I used a bit of jQuery like this and added to the footer - it fixed the issue:

<script>
jQuery("a[href='https://example.com/dropdown-menu-page/']").attr('href', '#');
</script>

@flth
Copy link
Author

flth commented Jan 15, 2019

thanks @coliff the js snippet is partly working, I notice the responsive hamburger menu is not working either

@coliff
Copy link
Member

coliff commented Jan 15, 2019

The responsive hamburger menu is working fine for me - maybe your issue is unrelated to this? Do you have a public link to your site in question so we can take a look?

@ve3
Copy link
Contributor

ve3 commented Jan 15, 2019

Thank you @coliff .
But that seems to be the same result as I provided. (Use # as URL with Custom Link menu).
This is my a little improved for dynamically change all dropdown links.

// hot fix Bootstrap 4.2.1
$('.dropdown-toggle').each(function(index, item) {
    $(this).attr('data-originalhref', $(this).attr('href'));// keep original to data-originalhref
    $(this).attr('href', '#');// replace href attribute.
});

@flth
Copy link
Author

flth commented Jan 15, 2019

NSFW https://fetishlady-marissa.com

@ve3
Copy link
Contributor

ve3 commented Jan 15, 2019

@flth From your URL, it seems that bootstrap.bundle.min.js is missing. That's why it is not working.
Some plugins may unload this file.

https://github.com/Rundiz-WP/bootstrap-basic4/blob/master/inc/classes/BootstrapBasic4.php#L89
These are assets (CSS, JS) that will be loaded on front-end.

@flth
Copy link
Author

flth commented Jan 15, 2019

Ok, I had removed that script before shortly for testing. Have it back and can't explain but it works again after I created a new menu entry with the same settings (url as #).
Thank you two for the heads up and solved so far.

@ve3
Copy link
Contributor

ve3 commented Feb 12, 2019

@ve3 ve3 closed this as completed Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants