CS Nuggets

This blog is for addons, bugs, fixes, and issues pertaining to Community Server.

CS2007: BUG: GetSkinPath()

There appears to be a bug in the method CommunityServer.Components.Globals.GetSkinPath().  If CS is running at the root of the Web Site spaces in the skin filepath name are converted to a + (plus), but if CS is running in a Virtual Directory they are correctly changed to %20.  I noticed this when I created a new Theme that has a space in the filepath name.  To correct the issue I made the following change:

File: CommunityServerComponents20/Components/Globals.cs:

Around line 209:

Replace the following line:

return ApplicationPath + "/Themes/" + Globals.UrlEncode(CSContext.Current.User.Theme);

with:

return ApplicationPath + "/Themes/" + Globals.UrlEncode(CSContext.Current.User.Theme).Replace("+", "%20");

Leave a Comment

(required) 

(required) 

(optional)

(required)