-
AuthorPosts
-
May 29, 2020 at 3:35 pm #1217753
Hi there,
We have 2 problems with anchorlink highlight in the main menu.
1) https://companypartners.de/
The menu item “Kontakt” (anchor) flickers. While scrolling the classes are permanently switching between “current-menu-item” and “current-menu-item”.2) http://neofin.elbnetz.com/ (Login below)
The menu item „Netzwerk” (anchor) is highlighted at the beginning, even though it is the last section (footer). It has the class “current-menu-item”. It loses the class as soon as the first anchor of the page (team) is reached.Of course, both items should only be highlighted, if they are scrolled to.
Now, they aren’t even highlighted IF you have scrolled to them (footer).Hopefully, the explanation is understandable.
Thank you for your help!Elbnetz
- This topic was modified 4 years, 6 months ago by ksalewski.
May 31, 2020 at 12:11 am #1218092Hey ksalewski,
Thanks for the links, for the first one please try changing your Kontakt menu item link from#kontakt
to/#kontakt
Try adding the same/
to your other site menu item “Netzwerk”Best regards,
MikeJune 2, 2020 at 11:11 am #1218729Hi there,
Thank you for your response.
Sadly, this didn’t change anything.Thanks,
ElbnetzJune 2, 2020 at 1:28 pm #1218768Hi,
I meant for companypartners.de to change your main menu Kontakt menu item link from#kontakt
to/#kontakt
, right now it is still#kontakt
Best regards,
MikeJune 2, 2020 at 1:40 pm #1218769Hi Mike,
We tried it but it didn’t work, so we retuned it to what it was before (which worked until recently).
We added it now again, it is still not working.Thanks,
ElbnetzJune 4, 2020 at 2:11 pm #1219401Hi,
Sorry for the late reply, thanks for the feedback, so for companypartners.de it looks like all of the menu items are custom links to anchors on the same page, except for “Startseite” & “News”. I notice that on the “News” page that News & Kontakt flash and the Kontakt menu item takes you to the homepage Kontakt form and not the Kontakt form on the News page.
I also notice that the language switch menu is also getting the “current-menu-item” class on scroll in the same flashing way, but since there is no css rules for this you don’t notice it. Does Kontakt flash on scroll if the language menu is disabled?
Please include an admin login in the Private Content area I would like to copy your menu to my localhost to try to reproduce this and investigate further.Best regards,
MikeJune 4, 2020 at 2:26 pm #1219406Hi there,
Here are the Log-in-credentials.
Thanks,
ElbnetzJune 5, 2020 at 1:55 pm #1219813Hi,
Thank you for the login, I tried to recreate this on my localhost, but my menu works correctly highlighting each menu item as it is in view, with no flickering. I see that you are using a child theme but the WordPress > Appearance > Editor is disabled so I can’t see if you have any custom functions in your functions.php
Please enable the Theme Editor. It looks like your server is using OPCache, is this an option you can disable while we investigate?
I recall an issue with some OPCache because it stores the script precompiled, instead of loading and parsing scripts on each request.
So it would be good to rule this out.Best regards,
MikeJune 11, 2020 at 12:50 pm #1221651Hi There,
Please look at the new log-in credentials.
We cleared the OPCache at the page http://neofin.elbnetz.com/ (Similar problem here in the Menu, same Server, same Theme, etc.)
Sadly, it didn’t solve the problem.
Theme Editor is enabled on this website (the other one is live so this one is a better one to test).Thank you for the help,
ElbnetzJune 12, 2020 at 11:28 am #1221996Hi,
Thanks for the login, unfortunately, this is not an admin login so I can not investigate the site settings and such, please elevate to admin.
Also, I don’t see the flashing of the menu items, are you sure this is occurring on this site also?Best regards,
MikeJune 12, 2020 at 1:08 pm #1222030Hi Mike,
I checked it, it is an admin-user.
Like I explained earlier, it is a similar problem, not the same:
______________________
2) http://neofin.elbnetz.com/ (Login below)
The menu item „Netzwerk” (anchor) is highlighted at the beginning, even though it is the last section (footer).
It has the class “current-menu-item”. It loses the class as soon as the first anchor of the page (team) is reached.Of course, both items should only be highlighted, if they are scrolled to.
Now, they aren’t even highlighted IF you have scrolled to them (footer).
______________________The main problem is, that the class “current-menu-item” isn’t working correctly on both sites.
The flashing is an extra problem on https://companypartners.de/.Thanks for your help,
ElbnetzJune 12, 2020 at 2:29 pm #1222079Hi,
I see, ok I will investigate this, but the login doesn’t give us access to your theme or WordPress options, please see the screenshot in Private Content area.Best regards,
MikeJune 12, 2020 at 2:36 pm #1222086Hi Mike,
I wrote you to take the NEW log-in credentials in the message at June 11, 2020 at 12:50 pm.
Those are admin Log-in credentials.Did you use OLD credentials from the May 29, 2020 at 3:35 pm?
Thanks.
June 13, 2020 at 8:39 pm #1222399Hi,
Thanks, so the first issue is that your menu has no “#top” or “home” link so the first anchor link that is found on the page is highlighted, so to correct I have added a hidden “#top” link so when the page is loaded no menu items are highlighted, but when you scroll down the anchors are highlighted.
The second issue seems that your “footer as a page” being linked to with a “#footer” anchor which should be ok, but it seems to work correctly when using “#footer-page” instead.
Please clear your browser cache and check.Best regards,
MikeJune 15, 2020 at 9:45 am #1222571Hi there,
Thank you! This worked.
The only thing is, that if we log out, we still see flickering and/or no menu items are highlighted.
We cleared the cache multiple times, Browser and Comet Cache.The problem is best seen at companypartners, if you log in, everything is fine, if you log out, it still flickers.
Do you have an idea, what to do?Thanks,
ElbnetzJune 18, 2020 at 11:48 am #1223666Hi,
Sorry for the late reply, glad to hear this helped. For companypartners, I see that when logged in the menu acts correctly, but when logged out the menu flashes when scrolling. Please enable the WordPress > Appearance > Editor so we can see the functions.php
I tried to test this on neofin.elbnetz but the site doesn’t allow logged out viewing of the site.Best regards,
MikeJune 22, 2020 at 9:57 am #1224527Hi Mike,
Sorry for my late reply!
We enabled the Editor under Appearance for you at companypartners.At Neofin.elbnetz we discovered that it works in incognito mode, so maybe there is some problem with our caching on this site, we will test further.
At companypartners the problem is still present in incognito mode, though.Thank you for the help,
ElbnetzJune 22, 2020 at 1:10 pm #1224591Hi,
Thanks for the feedback, so I logged into companypartners and cleared your site cache, again, and did a “hard reload” and then logged out cleared your cache again with another “hard reload” and now your menu doesn’t flash on scroll.
I didn’t do anything different this time but it seems that now the cache is clear, please give this a try and see if you can get the same results.Best regards,
MikeJune 22, 2020 at 4:59 pm #1224640Hi Mike,
We followed your steps on two of our Macs, sadly it didn’t work.
Thanks,
ElbnetzJune 23, 2020 at 2:40 pm #1224881Hi,
Strange, it’s not working for me either today, So for logged in users the menu links don’t flicker, but when logged out they do.
I see your Comet Cache is set to not cache logged in users, so logged out users are seeing the cache, but we have cleared it many times, so is there anything else that is set to be different for logged out users? Perhaps a script or plugin?
If it’s not the cache perhaps something else is causing this. Do you have a script or plugin that is watching for a “scroll” event?Best regards,
MikeJune 24, 2020 at 9:54 am #1225097Hi Mike,
We disabled Comet Cache on Companypartners, but regarding the flickering nothing changed, sadly.
We disabled all Plug-ins, but it didn’t work.
We also checked our funktions.php, but there is nothing unusual there. Same for CSS.We testet disabling the WPRocket on Neofin.elbnetz.com and found out, that the option “optimize CSS delivery” created the problem there. So that is solved!
We tried changing this option at Companypartners too, but nothing changed.
Thank you for your help,
ElbnetzJune 25, 2020 at 12:58 pm #1225471Hi,
Thanks for the summary, I have asked for the rest of the team to take a look at this for ideas to solve, thanks for your patience.Best regards,
MikeJune 25, 2020 at 2:18 pm #1225500Hey,
When I replace URL’s from “/#top” to “#top”, it does not flicker, however then correct menu item does not highlight.
I am pretty sure that is related to one of the plugins. Can we try de-activating plugins one by one to check further? If that is not going to be possible on your live site, could you please create a testing installation so we can test it there?Cheers!
YigitJune 25, 2020 at 2:39 pm #1225514Hi Yigit,
Feel free to de-activate the Plug-ins to test.
Thank you for your help!
ElbnetzJune 25, 2020 at 3:45 pm #1225555Hi Elbnetz,
It seems like issue is related to “Alternate Menu for Mobile”. When I disable it, it does not flicker with all plugins active, logged in & logged out. Are you using alternative menu on mobile to add “En” menu item? If so, maybe it would be better if we find a different solution for that? :)
Best regards,
YigitJune 25, 2020 at 4:10 pm #1225564Hi Yigit,
Thank you so much! That solved the problem for us, we used the “Alternate Menu” indeed to show only EN or DE on mobile.
But we now simply work with CSS, which is much quicker and we are using less menus / work around the “Alternate Menu” problem.Many thanks again!
ElbnetzJune 25, 2020 at 4:20 pm #1225571Hi Elbnetz,
You are welcome! :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Best regards,
Yigit -
AuthorPosts
- The topic ‘Anchor problems with menu highlight’ is closed to new replies.