One of the recent tasks I had was to find a way to tag our employees for various skills (Skills matrix concept). Our public facing website already leveraged the Shared Source module, Taxonomy, so I figured why not use the same solution.
I modified the user profile to use the Taxonomy custom field (Classification).
1) Go to the CORE database
2) Go to /sitecore/templates/System/Security/User
3) Add custom field:Taxonomy; field type: Classification
See: https://briancaos.wordpress.com/2014/06/12/sitecore-users-custom-profile-properties/ for more details on custom User Profile properties.
Easy enough, right? Wrong - all kinds of errors when editing the user's profile.
But Why?
1) IFrames - The user manager utilizes iframes, and these iframes don't play nicely with the Taxonomy module. The taxonomy module depends on passing request parameters back and forth. However the iframe breaks the logic. So when trying to retrieve particular parameters, you get null pointer exceptions.
2) Database references - For the most part these were correct, but I did find a few places where it tried to look up the Taxonomy tag using the CORE database. Of course this caused errors because the item could not be found.
In the end, it took quite a few modifications to the module but I was able to make it work within the User Manager. I'm not posting the rewrite as I think it has some additional work before being released to public - but if you need assistance feel free to comment and I'll get back to you.
I modified the user profile to use the Taxonomy custom field (Classification).
1) Go to the CORE database
2) Go to /sitecore/templates/System/Security/User
3) Add custom field:Taxonomy; field type: Classification
See: https://briancaos.wordpress.com/2014/06/12/sitecore-users-custom-profile-properties/ for more details on custom User Profile properties.
Easy enough, right? Wrong - all kinds of errors when editing the user's profile.
But Why?
1) IFrames - The user manager utilizes iframes, and these iframes don't play nicely with the Taxonomy module. The taxonomy module depends on passing request parameters back and forth. However the iframe breaks the logic. So when trying to retrieve particular parameters, you get null pointer exceptions.
Fix: Decided to switch to session variables. Not in love with the fix but it met my needs.
2) Database references - For the most part these were correct, but I did find a few places where it tried to look up the Taxonomy tag using the CORE database. Of course this caused errors because the item could not be found.
Fix: Add a hack method to return the database. If it is "core" return "master" instead. Hate this solution - but it works.
In the end, it took quite a few modifications to the module but I was able to make it work within the User Manager. I'm not posting the rewrite as I think it has some additional work before being released to public - but if you need assistance feel free to comment and I'll get back to you.
Comments
Post a Comment