The JS function insert_node_destination() breaks comment links on sites thet have a base path set and/or use a language prefix. The function modifies the comment links (delete, edit,reply) by adding a destination parameter. The function hereby does not honor any prefixes (base, language). This causes the destination parameter to become "drupal/en/node/88" instead of "node/88" (with "drupal" being the base path and "en" being the language prefix).

Attached please find a patch that fixes the destination parameter issue by using a global JS variable that hold the node link. This variable is being used by the JS function later as the value for the destintaion parameter.

Comments

AlexisWilke’s picture

Status: Fixed » Needs review
StatusFileSize
new945 bytes

Hi fajo,

Can very well be! 8-)

If you would please check this cleaner patch, I would really appreciate. It makes use of the Drupal JS settings.

Thank you.
Alexis

fajo’s picture

Status: Active » Needs review

Hi Alexis,

the patch works like a charm - does the same but the implementation is a way smarter (I have not read through the drupal_add_js() completely ;o)

Thank you,
Falk

AlexisWilke’s picture

Status: Needs review » Fixed

Falk,

Cool. 8-)

Note that it took me some time to understand the JS implementation! It's not so bad once you get it.

It's checked in the 1.x-dev version so it will make it in the next major version.

Thank you.
Alexis

Status: Needs review » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.