# External links in history don’t follow “Open all external links in a new tab” setting

**URL:** <https://meta.discourse.org/t/external-links-in-history-don-t-follow-open-all-external-links-in-a-new-tab-setting/42995>\
**Category:** Bug\
**Created:** [22 Aprile 2016, 4:48pm UTC](https://meta.discourse.org/t/external-links-in-history-don-t-follow-open-all-external-links-in-a-new-tab-setting/42995 "2016-04-22T16:48:15Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [28 Aprile 2016, 3:36pm UTC](https://meta.discourse.org/t/external-links-in-history-don-t-follow-open-all-external-links-in-a-new-tab-setting/42995/20 "2016-04-28T15:36:24Z")

</div>

Well the DOM is entirely different between the two pages. The profiles are using the excerpt and are not a full article which is what ClickTrack was expecting. As such, ClickTrack isn’t capable of finding postId or topicId. I’m not saying it isn’t possible, but none of those data attributes are on the excerpts shown on the Profile pages, so that view would need to be altered (not a big issue).

More importantly, though, again, this isn’t duplicating anything anymore. I just extended ClickTrack to work even when the postId/topicId are not present, which permits it to work on the Profile Page and will permit it to work with Edit History once I tell that logic to call ClickTrack for handing the links found in the post. By extending ClickTrack to not fail when postId/topicId aren’t present, it gives a way for Discourse to use it as “the” click handler for all things post related.

---

_[View the full topic](https://meta.discourse.org/t/external-links-in-history-don-t-follow-open-all-external-links-in-a-new-tab-setting/42995)._
