Thursday, August 20, 2015

This page is no longer active

Doesn't it annoy you when you get this error message "This page is no longer active. Please go back to your most recent page" ? This mostly happens when you you have multiple windows open and you have clicked on the home link from the newly opened windows. It seems web server loses track of multiple sessions when home link is clicked from newly opened windows.

I ran into this a while back working for my client. I had developed a pagelet containing a component with links to frequently used transaction. The links were push button and I had used button property to define the target (menu, component, page etc. ) . We encountered "page no longer active" message every now and then. A few weeks later I noticed that when a button was clicked on the pagelet it would open up the target page in the same window but the url had sitename_1 in it. This usually happens when you click on "New Window" from a page and the page opens up a new window. Not sure if this is a bug or it works as designed but having sitename_1 in the same window caused this problem for us because we were clicking on home to get back to the pagelet. I tried using GenerateComponentContentURL to generate a url to transfer but even that included sitename_1. Well, I ended up writing a small peoplecode to overwrite sitename_1 to sitename in the output of GenerateComponentContentURL and then doing the redirect to the target page. Not sure, if this is the best solution but we have not seen this message since.



Wednesday, July 22, 2015

Hiding Portal Header

You may run into this requirement to hide the portal header. Your need may different but I had to hide it for the password recovery site. Modifying portal definition may yield the same result but I found it easier to use a small java script in the html area on the page. Here is the code


if (top.document.getElementById('pthdr2container'))
{
top.document.getElementById('pthdr2container').className = "pthnavbarhide";
}

if (top.document.getElementById('pthnavcontainer'))
{
top.document.getElementById('pthnavcontainer').style.display = "none";
}

P.S. : Keep in mind that the ElementIDs may be different depending upon your tools versions and the stylesheet used. You also need to add  script tags

Monday, July 20, 2015

Debug SSL connection on App Server / Issue with TLS and tools 8.54

 Recently I had trouble installing an ssl cert on the Gateway. The app server log showed usual handshake failure but that was not enough to figure out the issue. After some search on the internet I found out that you can append to Java options to trace ssl connectivity issues in the application server configuration. Here is the text to attach  "-Djavax.net.debug=ssl" . This helped a great deal as the trace pointed out the issue. Server was setup to use TLS only and app server was trying to connect using SSL. App server or Process Scheduler can be forced to use TLS by appending  to the same Java options. After adding "-Dhttps.protocols=TLSv1" to app server configuration connectors loaded successfully.