I have a managed app that I spent a few months developing. I tested it in Classic mode. It works great. But then I switched to Lightning mode. Then I try to go to the login page:
/apex/PriLogin
And I get:
Page not found.
Why would this work in Classic mode but not Lightning mode? Some deprecated component? How would I track that down?
This code creates the link:
public static void tellUserToLogin() {
String message = '<a href="/apex/PrivLogin">You need to login to Priv!</a>';
ApexPages.Message msgErr = new ApexPages.Message(ApexPages.Severity.ERROR, message);
ApexPages.addmessage(msgErr);
}
Which is then shown on the page via:
<apex:pageBlock title="Search PrivCo">
<apex:pageMessages />
<apex:pageBlockButtons >
This works fine in Classic Mode.
From Creating Visualforce Pages That Work in Mobile and Desktop:
If the sforce object isn’t available, trying to use it to navigate anywhere results in a JavaScript error, and no navigation. So, instead, the code sets the window’s URL using a Visualforce expression that returns the URL for the account’s detail page. You don’t want to do this in Salesforce1 because the navigation event will be lost by the framework, but it’s required in normal Visualforce.
I don't know the terminology here. What is the sforce object for? I think Salesforce1 is a website that is optimized for cell phones -- I don't need that, so can I ignore that? Is Lightning mode the same as Salesforce1?