arajvanshi
(arajvanshi)
4 באפריל, 2014, 2:07pm
1
I selected the setting default_external_links_in_new_tab in the admin area. This resulted in the expected behaviour of setting default preference of all new users set to ‘open external links in new tab’.
However, for non-logged-in visitors, the behaviour is still the old one, it is opening the external links in the same tab leading visitors to go away from the website. When admin selects the default_external_links_in_new_tab setting, it should change the behaviour for non-logged-in visitors as well.
4 לייקים
arajvanshi
(arajvanshi)
18 באפריל, 2014, 7:02am
2
Any update on this issue? Anything I can do to fix this locally?
mcwumbly
(Dave McClure)
18 באפריל, 2014, 2:12pm
3
The default_external_links_in_new_tab setting was added relatively recently. Before that, only end users could change this via their user preferences.
I am guessing the issue is that when that setting was added, it was implemented such that when a new user is created, their initial preference is set.
But the logic still holds that the setting is only effective for the current user via their preferences.
This may or may not have been a conscious decision, so I think you should recategorize this topic as a “feature” request.
לייק 1
riking
(Kane York)
18 באפריל, 2014, 2:17pm
4
I knocked together a quick PR:
discourse:master
← riking:anon-external-links
opened 02:17PM - 18 Apr 14 UTC
> Security analysis: This sends another SiteSetting to the client - default_exte… rnal_links_in_new_tab. This is a boolean setting, so information disclosed is limited. Additionally, it is the default for a setting that users are allowed to change. This does not reveal much other than something that might be a personal preference of the site owner, and not anything about the site itself. Sending this site setting has a clear purpose and no real risk.
Is there a better place to put this, other than in `discourse.js`?
The ‘false’ behavior was from acting on an undefined value returned from Discourse.User.currentProp()
when there is no current user, so it seemed to me to not be intentional one way or the other.
4 לייקים
Barnabas20
(Barnabas)
18 באוגוסט, 2014, 1:00am
5
Non logged in users still not able open external links on new tab.
Is there any update plan on that?
Is this feature available yet?
sam
(Sam Saffron)
6 ביולי, 2015, 3:43pm
8
@riking what is going on here?
riking
(Kane York)
6 ביולי, 2015, 5:42pm
9
We still have the problem behavior mentioned in the OP.
sam
(Sam Saffron)
16 במאי, 2017, 3:22pm
11
pr-welcome here, I do not think this is bug proper, rather expanded functionality for anon.
3 לייקים
MarcP
(MarcP)
1 ביולי, 2021, 3:46pm
12
I would think it’s useful for anon/guests to open external in tabs… might lose traffic here because they bounce following a link in a topic.