CMS Login page redirection issue

scottlmco
Giga Contributor

I have a CMS login page set up for our end-user facing interface that we've developed using ServiceNow's CMS. The issue I'm seeing is that if a user is not logged in but attempts to access some page in the CMS via a direct link (like servicenow.com/myInstance/cms/sub-page), he is prompted to log in first. This is expected. However, when the user is authenticated, he is routed to the correct CMS page but it is within the gsft_nav frame; meaning, the user sees the itil user view with the list of applications/modules off to the left and the ServiceNow header along the top. Within the content frame the CMS page is displayed correctly, but obviously this is not the behavior we want. We want the login page to route to the appropriate CMS page without being displayed within the gsft_nav pane. It's quite odd, and I can't seem to work out what piece of configuration I'm missing.

I've attempted to use the (depricated) Login Rules which works if the user is simply attempting to access the root ServiceNow system, as this redirects the user to the CMS homepage I've specified in the login rule. But giving the user a link to a CMS page and they are not logged in results in the strange behavior I've outlined above.

1 ACCEPTED SOLUTION

What does the link look like? Also, do you have the frame buster checkbox checked on the cms homepage?


View solution in original post

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi scott,



You may find the below thread helpful.



CMS - Login redirection issue


Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Scott,



When the user is already logged in, how is he getting to the CMS page? Is it a link from an email or a left nav link module? If it's a left nav module, make sure that the target window is _blank like the following to open in a new tab or window.



c9af3eeff4.png


So if a user is already logged in, and he receives a link to some page within the CMS, he's routed fine. What's happening is that a user is given a URL to a page within the CMS (just like a link to any other website, not necessarily through a module) and it is the case that the user is not already logged in. So when the user is prompted to log in with our custom login page (configured in the site record), the user is subsequently routed to the standard itil nav page with the CMS content inside the nav pane. It looks like this:



ess_in_gsft_main.PNG



You can see the CMS content inside of the gsft_nav pane which has all the applications/modules off to the left, rather than the CMS page as a standalone, as one would expect.



Additionally, I should note, our login page uses the clean login content block with the following code:


<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


  <j2:set var="jvar_login_url" value="$[jvar_RP.getParameterValue('sysparm_login_url')]" />


  <g:insert_form name="login" />


</j:jelly>


What does the link look like? Also, do you have the frame buster checkbox checked on the cms homepage?