Disappearing role based icons?
We have various role based icons displayed along with the help/logout icon. On occasion, some of those icons are disappearing from the users layout. For example, yesterday, I get 4 reports of users missing their email icon. The email icon is only available to students, faculty, and staff. Not alumni. I've seen this happen before when we've ran some massive cptool imports, but no imports were ran yesterday. When it does happen, its been late in the day, almost like the system just needs restarted or something. We do restart everynight, and this does fix it for the next day. Its like the system is getting bogged down throughout the day, and when the user logs in, it just can't process the icon evaluator. However, we only had 200 users log in yesterday on single deployment, so there was no real load on the system. We have 9 icons total, do we have too many? I've seen other examples of schools with just as many. Just wondering if anyone else has had issues with the role based icons disappearing for certain roles.

Broken IconEvaluator class
L****** had a bug on platform IV where the icons were incorrectly cached. Its symtoms are exactly as you describe - missing icons for users who should have them.
If you are using a custom IconEvaluator class, make you can remedy this broken cache issue by replacing the following:
import campuspipeline.uportal.dlm.provider.ExtensionClass;
with this:
import org.jasig.portal.channels.cpicons.IconEvaluator;
we're having the same
we're having the same problem - after a large cptool load, the custom icons stop working.
Unfortunately, we can't replace that class since we use the ExtensionClass to check some config values in determining which icons to display. Following the UI customization guide, both classes are imported in our extension class.
Any other suggestions?
never mind - found how to
never mind - found how to grab those params with the ExtensionClass - thanks!
fix rehash
I know this is kinda an old post, but we only migrated to LP4 in April 2010 and we didn't have the disappearing icon problem in a serious way until now... Maybe this will help someone else. It seems to have fixed our problem!
Although the FAQ from SunGard says that there was a change in LP 3.3, I don't believe the docs for LP4 have this info...(Well, at least I didn't find/see it.)
From SunGard FAQ# 1-2KMFH6:
Try NOT using ExtensionClass
We had an issue with our custom IconEvaluator class in that we were receiving exception errors very often in cp.log, but it seemed most users were getting the icons as intended. We later found out that some students were getting the faculty/staff version of the email icon. I sent a request to SunGard and they said not to use the ExtensionClass method as posted in the CDK. As of hotfix 32, they have an updated document with some different ways of finding system properties.
Remove the import ...ExtensionClass line
replace
if (ExtensionClass.getDirectoryProperty("blackboard.enabled ").equalsIgnoreCase("true") )
with
if ( getDirectoryProperty(cpInfo,"blackboard.enabled").equalsIgnoreCase("true") )
This can also be used to find the user's roles:
String[] userRoles = (String[])getLDAPAttributes(cpInfo,"pdsRole").toArray(new String[0]);
instead of
String[] userRoles = ExtensionClass.getLDAPAttributes("pdsRole");
Current CustomIcons class
Here's my cleaned up version of our CustomIcons class:
/** * Customization of icon display based on CSU criteria. * * @author bsimpson, jsumners */ package edu.clayton.icons; import java.util.*; import org.w3c.dom.Element; import org.jasig.portal.channels.cpicons.IconEvaluator; public class CustomIcons extends IconEvaluator { public Map evaluate(Element cpInfo) { Map icons = super.evaluate(cpInfo); // Get assigned roles out of Luminis LDAP. String[] tmpArray = (String[])getLDAPAttributes(cpInfo, "pdsRole").toArray(new String[0]); SortedMap userRoles = new TreeMap(); // Convert our string array to a map for easier lookups. for (int i = 0, j = tmpArray.length; i < j; i += 1) { String role = tmpArray[i].toLowerCase(); userRoles.put(role, role); } // Roles to enable icons for. // Icons will be named the role name (lowercase). String[] iconRoles = { "advisortrac", "bannerinb", "email", "guest", "tutortrac", "webct", "wiki" }; Arrays.sort(iconRoles); for (String currentRole : iconRoles) { if (userRoles.containsKey(currentRole)) { icons.put(currentRole, "true"); } else { icons.put(currentRole, "false"); } } return icons; } }