Hide the ‘Windows 7 is not supported’ message January 27, 2010Posted by Duncan in PeopleTools 8.50, PIA, Windows.
If you’ve been using the latest version of PeopleTools with any version of Windows 7 (which is becoming more prevalent) then you’ll have seen this error message many times:
Now I’m all for being warned if I’m doing something unsupported and I know Windows 7 isn’t supported yet, but probably will be in the near future. I’m not going to swap my client OS just to keep the PIA happy, but I don’t want to be warned every single time. Also, it’s not a very well formatted error message as it throws out the alignment of the logon screen and it just looks a little messy.
I wasn’t going to do anything about my niggly annoyance until someone else wondered how to remove it then it piqued my curiosity.
As far as I could see there are two ways to fix this, find a way of adding Windows 7 to the supported OSes, or hide the warning message.
I tried many variations of OS codes in the browser.xml file as that appears to be where the supported OSes are read from (the sharper eyed among you may have noticed that I’ve added Windows 7 to the list in the above screenshot). This had no effect however, so I admitted defeat in trying to fix the cause and resigned myself to just trying to hide the symptom.
The HTML behind the signon page is ‘signin.html’ within ‘<PIA_HOME>\webserv\<domain>\applications\<site>\PORTAL.war\WEB-INF\psftdocs\<node>’. We can’t just comment out the error sections as we only want to hide this specific error message, other errors like ‘invalid password’ we still want to see.
The first step is to hide the browser error message. Search for ‘id=”browsercheck_error”‘ and you’ll see this section. Comment out as shown.
<h2 id="login_error"> <%=error%> </h2>
<h2 id="discovery_error"> <%=ps.discovery.error%> </h2>
<!--<h2 id="browsercheck_error" style="text-align:left"> <%=browserCheck%> </h2>-->
This prevents the text from showing, however we also want to prevent the warning image being displayed for this warning also.
Search for ‘setErrorImg’ and you’ll see this function. Comment as shown and add the line below.
var login_error = document.getElementById('login_error').innerHTML;
var discovery_error = document.getElementById('discovery_error').innerHTML;
/*var browsercheck_error = document.getElementById('browsercheck_error').innerHTML;*/
var browsercheck_error = "";
login_error = login_error.replace(/^\s+/,""); // delete leading spaces
discovery_error = discovery_error.replace(/^\s+/,"");
browsercheck_error = browsercheck_error.replace(/^\s+/,"");
if (login_error.length != 0 || discovery_error.length != 0 || browsercheck_error.length != 0)
document.getElementById('error_img').style.display = 'block';
Bounce your PIA and now the message won’t be displayed when you use Windows 7, however other error messages will still appear as desired.
Note: Updated 27th Jan after Jim Marion’s suggestion below on my incorrect commenting syntax.