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

4 thoughts on “Sitecore 8 – General Link Field – Internal Link – Target doesn’t render properly

Add yours

    1. 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.

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

Blog at WordPress.com.

Up ↑

%d bloggers like this: