Skip Navigation

[Resolved] menu "current item" class doesn't list when archive page is pasted as url

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Ido Angel 6 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1097862

hey,

when i go to the homepage - hidden link - and click a menu item (or a sub menu item), everything works fine.
but when i copy and paste the sub menu url into the url box in the browser - for example: hidden link - the "current menu" class disappears.

all submenus are product archives which i created with toolset "wordpress archives" for products.
the problem is only with submenus which are wordpress archives. i tested this by creating a menu with a submenu which is a normal page (an "about" page, for example), and it didn't lose the "current menu" class when pasting the url in the browser box.

everything also works fine the the original theme demo page. this is strictly a toolset archive issue.

any ideas?

thanks!

#1097866

(same thing happens after pagination, btw)

#1097994

I'm quite ignorant about Hebrew character encoding, but I can see that the submenu link URL includes lower-case encoded characters:

<em><u>hidden link</u></em>

If I load that page, the current class is applied correctly. But then if I copy the URL in the browser URL bar and paste it into another window or another browser, the encoded characters are upper-case:

<em><u>hidden link</u></em>

This page loads but does not recognize the current menu item, I'm guessing because of the case differences in the URL.

If I go back to the homepage and right-click a link to copy the link location, then paste that into another browser URL, then the current classes behave as expected. So it has something to do with how Hebrew encoded character text is copy + pasted after it's rendered in the URL bar, and the case of the character encoding. My guess is that the menu system interprets these as different URLs, which affects the current menu item classes. Is this a custom menu? Do you have the ability to modify the logic for determining the "current" menu items? If so, a function to normalize the encoding character case might be useful.

A quick search led me to some relevant posts:
https://wordpress.stackexchange.com/questions/300715/uppercase-to-lowercase-in-url
https://wordpress.stackexchange.com/questions/51498/wordpress-slug-issue-with-non-latin-characters
https://serverfault.com/questions/308415/wordpress-escaped-encoded-hex-url-case-sensitive-problem

#1098377

hey Chris,
thanks!

That's so strange, because the in hebrew there are not capital letters. why would copying and pasting create the character encoding in capitals? :\
one of the urls your reffered me to suggested this plugin:

https://wordpress.org/plugins/permalowercase301/

installed, and it works.

BUT - this doesn't resolve the pagination issue. when i paginate, the url changes and the menu loses it's classes again. not sure what to do there...

thanks a lot!