Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Custom login session screen images or css file does not download

SA-11492

Summary



User upgraded from PRPC 6.1 SP1 and CPM 6.1 to Pega 7.1.7 and CPM 7.1.3. After the upgrade, the login and logout screen is not displaying correctly as the related CSS and some image files are not getting downloaded.
One error that appears in the logs is related to the CSS file not being downloaded. The images used in the login screen are all in the css. The logout screen uses CSS embedded in the logout screen. There appears to be no errors related to the images referenced in the logout screen, however the main image (related to the login button on the logout page) is not displayed to the user

Error Messages



ERROR - Internal Error on request: /oO9O9iMscyJc_fy6LnBDXO9xEtRpDxfL3At36r8Aw8k[*/webwb/default_12321109455.css!!.css

Steps to Reproduce



1. In PRPC 6.1 SP1, create the custom login and logout html using the components provided in this SR.
2. Verify that the custom screens work in Pega 6.1 SP1
3. Upgrade to Pega 7.1.7
4. Log in and log out of the Pega custom screens
5. Verify if the custom screens work and that the related files are available in the PegaTemp\StaticContent directory.

Root Cause



The root cause of this problem is -

In Pega7 CSS is a new type of static content in the system - called Assembled Static Content. Upon first request like all other static content (images), the static content subsystem will extract these from the DB and write the files to the prtemp  StaticContent directories. 

1. Logoff action calls an activity which unAuthenticate the requestor and calls the EndSession activity which will display a HTML source and kills the requestor connection as well.
2. After UnAuhenticating the requestor, WebRedirect happens in Logoff activity to call end-session activity.
3. Now image files are not being shown on screen as the pega-rules cookie is sent as none causing the static content requests getting ignored there after.

Resolution



This issue is resolved through the following local-change:

1. For CSS style, instead of Pega include tags, suggested user to refer the css file using <link ref='stylesheet' /> tag since they have customized the entite login and logoff screen.

2. For images, added the below code in a HTML fragment for fetching the images from DB and have included the HTML fragment in user's logoff html to display the image on screen.

HTML fragment source

<% 
HashStringMap hsmKeys = new HashStringMap(); 
hsmKeys.putString("pxObjClass", "Rule-File-Binary"); 
hsmKeys.putString("pyApplicationName", "webwb"); 
hsmKeys.putString("pyFileName", "IMAGE_NAME"); 
hsmKeys.putString("pyFileType", "png"); 

/* Open the Rule-File-Binary. */ 
ClipboardPage cpFile = null;    
try { 
cpFile = tools.getDatabase().open(hsmKeys, false); 
} catch (DatabaseException dbEx) { 
oLog.error("Database Error while opening binary file rule", dbEx); 
}    

out.print("<img src=\"data:image/gif;base64,"); 
out.println(cpFile.getString("pyFileSource")); 
out.println("alt=\"logout\" />"); 
%>


And then added this to <pega:include name='Logouticon' type='Rule-HTML-Fragment'/>  to web-session-return html source.

Published July 29, 2015 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us