Skip to content

Conversation

@alexdraconian
Copy link

  1. Strip parameter as well as anchor.
  2. Fix tooltip not working for relative link.

1. Strip parameter as well as anchor.
2. Fix tooltip not working for relative link.
Resolve link id before passing to helper
Comment on lines +51 to +54
resolve_pageid(getNS($ID), $id, $exists);

global $ID;
if (!$this->m_helper->isExcluded($ID) && page_exists($id) && $id != $ID) {
if (!$this->m_helper->isExcluded($ID) && $exists && $id != $ID) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change accomplish?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there're relative links, autotooltip did not recognize them as relative link, but absolute link.

Example:
In "namespace:some_page", there're link like "[[other_page]]".
Since this is relative link, this link should be resolved as ":namespace:other_page".
However autotooltip resolved as ":other_page" and consider linked page does not exist.

So I re-positioned link resolve logic to early stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants