Namespace Visualforce navigation from <a> HTML tags broken in Lightning Experience, uses default namespace for navigation
Apex , VisualForce , Winter 16
Last updated 2018-03-15 ·Reference W-2817361 ·Reported By 22 users
No Fix
Summary
The issue arises in <a> tags in Lighting Experience only.
All <a> tag relative links always point at the default namespace for the org instead of the managed namespace for the Visualforce page even though the highlight for the link shows the correct absolute URL and namespace.
For Visualforce <apex:outputLink> tags we transform links in
======Classic=======
From
<apex:outputLink value="/apex/TestPage2">TestPage2</apex:outputLink>
to
<a href="https://shanep.eu5.visual.force.com/apex/TestPage1">TestPage1</a>
and
From
<a href="/apex/TestPage2">TestPage2</a>
to
<a href="/apex/TestPage2">TestPage2</a>
but in
=======Lightning Experience========
From
<apex:outputLink value="/apex/TestPage2">TestPage2</apex:outputLink>
to
<a href="javascript:srcUp('https%3A%2F%2Fshanep.eu5.visual.force.com%2Fapex%2FTestPage2%3Fisdtp%3Dp1');">TestPage2</a>
and
From
<a href="/apex/TestPage2">TestPage2</a>
to
<a href="/apex/TestPage2">TestPage2</a>
Repro
- Create two Visualforce pages: TestPage1 and TestPage2 in a Developer Organization
-----------------------------------
<apex:page standardController="Account">
TestPage1
<br/>
A href
<br/>
<a href="/apex/TestPage2">TestPage2</a>
<br/>
OutPutLink
<br/>
<apex:outputLink value="/apex/TestPage2">TestPage2</apex:outputLink>
<br/>
</apex:page>
-----------------------------------
-----------------------------------
<apex:page>
TestPage2
<br/>
A href
<br/>
<a href="/apex/TestPage1">TestPage1</a>
<br/>
OutPutLink
<br/>
<apex:outputLink value="/apex/TestPage1">TestPage1</apex:outputLink>
<br/>
</apex:page>
-----------------------------------
- Create an namespace on your Developer Org and a Managed Package
- Add the two Visualforce Pages to the package and upload it copying the link
- Log into another organization and install the package.
- Override the Account View with TestPage1 and then switch to Lightning Experience.
- Navigate to any Account page and click on either the A href link or OutputLink, clicking OutputLink will work as expected maintaining the correct namespace, clicking on A href link will navigate to your default org namespace which results in either URL "No Longer Exists" or "Page namespace__TestPage1 does not exist". (Behavior varies on how the page will display)
Workaround
1) Right click on the link and select "Open Link in New Tab";
2) Disable Lightning Experience;
3) Change the <a> tag references to make use of the Visualforce tag <apex:outputLink>
Reported By (22)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.