Sitecore 8 – General Link Field – Internal Link – Target doesn’t render properly

I recently ran into an issue with versions of Sitecore 8 through Update 3, where that if you use a General Link field and choose an Internal Link, the target attribute will be incorrectly set.

If you choose New Browser, your target attribute will actually render as “New Browser” as in:

<a href="/somepage" target="New Browser">Some Page</a>

In the case where you choose “Active Browser”, it will render as follows:

<a href="/somepage" target="Active Browser">Some Page</a>

Of course, the correct renderings are:

<a href="/somepage" target="_blank">Some Page</a>
<a href="/somepage">Some Page</a>

If you want to fix this, you will have to modify some items in the Core database.

/sitecore/client/Applications/Dialogs/InsertLinkViaTreeDialog/PageSettings/Targets/Active Browser
• Set the display name to a space – “ “ (it needs a space, because setting the display name to an empty string unsets the display name)

/sitecore/client/Applications/Dialogs/InsertLinkViaTreeDialog/PageSettings/Targets/New Browser
• Set the display name to “_blank”

It works, but unfortunately, this is what the drop down ends up looking like in the UI:

 

general link

Advertisements

4 Responses to “Sitecore 8 – General Link Field – Internal Link – Target doesn’t render properly”

  1. dcouto1984 Says:

    Thanks for the helpful post! Did you report this as a defect to Sitecore Support? If so, did they provide an alternative solution?

    • Andy Cohen Says:

      Thanks. I did file a Sitecore ticket, and they acknowledged the bug in ticket #440972. They also gave that same workaround. Hopefully they fix this soon. They gave me the reference number 427159, which I suspect is another ticket by another user acknowledging the same thing.

  2. dcouto1984 Says:

    Thanks for the post, Andy. Here’s an alternative solution that doesn’t require renaming any items – https://community.sitecore.net/developers/f/8/p/195/1682#1682

  3. Lavanya Says:

    Hi,
    According to steps said in https://community.sitecore.net/developers/f/8/p/195/1682#1682 i have changed the target path.Its working fine for internal link but when we select external link still the target dropdown shows “New Browser”,”Active browser”.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: