Page 1 of 1

Problems when changing IP address to System Name in the URL

Posted: Thu Oct 05, 2017 11:51 am
by arora.saurabh
Hello,

We have recently changed the IP address to system name in the Menu Item URL (Control Panel -> Navigation). We are facing the below problem after this change:
1) When the program or ends, it brings up 'Your session has ended" instead of closing that tab directly. When 'Close' button is clicked on it, it brings up another message "To complete the log off process, please close your browser window." and has to be closed by using the 'X' on the tab. Whereas the tab used to get closed on its own when using the IP address.
2) We have grids with onrowdblclick property to open another tab with more information. Using Atrium.launchURL in the rowdblclick property the new tab was opened. But after changing IP to system name, we are getting an error saying "Blocked a frame with origin URL from accessing a cross origin frame.

Please advice if we are missing something.

Thanks,
Saurabh Arora

Re: Problems when changing IP address to System Name in the URL

Posted: Thu Oct 05, 2017 12:15 pm
by arora.saurabh
Just to add, we are using Atrium.getCurrentTab() which is causing the error somehow for #2.

Thanks,
Saurabh Arora

Re: Problems when changing IP address to System Name in the URL

Posted: Thu Oct 05, 2017 2:55 pm
by arora.saurabh
As we were using the URL with IP address in the browser to open Atrium, it was causing this problem. When the Atrium was opened with the System name in the URL, it worked fine.

Thanks,
Saurabh Arora

Re: Problems when changing IP address to System Name in the URL

Posted: Fri Oct 06, 2017 2:38 pm
by matt.denninghoff
Both your problems #1 and #2 seem due to the browser cross-origin security restraints. Although your IP address and the system name point to the same machine, the browser sees those as two different origins. When the parent page, which is Atrium, is of one origin, and the child iframe, which is an Atrium tab, is another origin, then JavaScript code in the parent cannot control the child iframe and vice versa.

The origin is comprised of the protocol (http or https), domain name, and port number.

Since Atrium's JavaScript can no longer close the session in the tab (a child iframe), you see the "Your session has ended" message, and your user must manually close. One way to fix that problem is to change the Navigation item to use the same origin as the parent Atrium page. So if the Atrium page is now loading with the system name, then you'd need to change the Navigation items to use the system name rather than the IP address.

Similarly, if your Atrium.launchURL argument still uses the IP address, but Atrium uses the system name, then you'd need to change the argument to Atrium.launchURL to point to the system name.

Re: Problems when changing IP address to System Name in the URL

Posted: Fri Nov 03, 2017 10:10 am
by arora.saurabh
Thanks Matt !!