allBlogsList

Internal Link Bug Sitecore 8

An inssue I found while working in Sitecore 8 Release 3 - The internal link selector has a bug when selecting the link's target. If you want your link to open your link in the same tab and you select Active Browser, the html renders as target="Active Browser".

This clearly is not what we want. To fix this, browse to this location within your website directory: \sitecore\shell\client\Speak\Layouts\Renderings\Resources \Rules\ConditionsAndActions\Actions Create a backup of MakeInternalLinkFromTreeView.js and open it. Add the following to the if statement on line 28

if(targetWindowValue.$displayName.trim() == "Active Browser"){
targetWindowValue = "target=''";

}

This is what my whole section looks like:

targetWindowValue = targetWindowID.get("selectedItem");
if (!targetWindowValue || targetWindowValue.itemId === emptyOptionID) {
targetWindowValue = "";
} else {
if(targetWindowValue.$displayName.trim() == "Active Browser"){
targetWindowValue = "target=''";
}else{
targetWindowValue = "target='" + targetWindowValue.$displayName.trim() + "'";
}
}