verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 23 forks source link

Active state doesn't work the same #190

Closed ilicmarko closed 4 years ago

ilicmarko commented 4 years ago

Description

This is actually not a bug/problem. It is here as a help to all users who are wondering why are some links suddenly active after the update.

There was a potential breaking change introduces in the v1.3.26. With the commit https://github.com/verbb/navigation/commit/f6fe27ccf888169ffea603daf9529725b66278e3 a condition that always returns false is removed.

https://github.com/verbb/navigation/blob/bc59a2d82b5c5950225dfc44ece07d30e57cd22b/src/elements/Node.php#L610

What this means is if you had a Manual URL that has a blank URL (empty field) all those links will show as active on the homepage, after you update to 1.3.26.

Therefore, you need to update your Manual empty URLs to something else, for example #.

engram-design commented 4 years ago

This is a bug and is fixed in the latest craft-3 branch

engram-design commented 4 years ago

Should be fixed in 1.3.29