Looks like you are running the component in a vf page.
The problem is, the value attribute of <ui:outputURL />
points to an incorrect relative url. Click herehere to know more about the significance of adding /
in href (becoz <ui:outputURL/>
generates anchor tag <a />
), which changes the relative url.
So, all you have to do is, add /
before the id:
<ui:outputURL value="{!'/'+alert.Id}" label="{!alert.Name}" aura:id="detailContURL" target="_new"/>.
I believe this will solve your issue, and those workarounds might not be needed at all.