Let's take this scenario:

  1. The site is at http://localhost/mysite.
  2. There are 2 items in main menu: node/1 and node/2.

The module will replace the menu items with: #node/1 and #node/2 and the scroll will not work because the targets are 1 and 2. Why? Because in js/menu.js the href is split by /mysite. And the last chunk will be the full node path (node/1 or node/2).

Other scenario: Two menu items: taxonomy/term/123 and node/123. Both will generate the same anchor: #123. But they are different.

And a third one: Two aliased nodes: node/1 => first/item/alias and node/2 => second/node/or/item/alias. Both will generate the same anchor: #alias.

There's need for a normalized anchor design.

Comments

claudiu.cristea’s picture

Status: Active » Needs review
StatusFileSize
new1.63 KB

Here's a patch.

claudiu.cristea’s picture

StatusFileSize
new1.91 KB
new1.65 KB

A better approach for extracting the anchor.

vadim.jin’s picture

Also, this problem can be solved if you install the path module and at page creation (or editing) specify URL alias.

claudiu.cristea’s picture

My patch fixes that in case you don't have path enabled.

yaremchuk’s picture

fixed in
7.x-2.0-beta8

yaremchuk’s picture

Status: Needs review » Closed (fixed)