ModuleSettings.aspx.cs

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/23/2006 12:26:47 PM
Gravatar
Total Posts 68

ModuleSettings.aspx.cs

Hi, found this in: ModuleSettings.aspx.cs, the GlobalResource object is null, and when the ToString method an error is thrown before the check for null.  Code below:

String settingLabel = GetGlobalResourceObject("Resource", s.SettingName + "RegexWarning").ToString();
if (settingLabel == null)
{
       settingLabel = "Regex Warning";
}



I changed it to this, and now it works:


Object oSettingLabel = GetGlobalResourceObject("Resource", s.SettingName + "RegexWarning");
String settingLabel = String.Empty;
if (oSettingLabel == null)
{
        settingLabel = "Regex Warning";
}
 else
{
        settingLabel = oSettingLabel.ToString();
}


Just wanted to let you know, I havnt got the latest version from svn so maybe you already made this change. This appeared when I added roles with swedish letters (å, ä, ö).

Cheers,
Christian Fredh
8/23/2006 12:32:42 PM
Gravatar
Total Posts 18439

Re: ModuleSettings.aspx.cs

Hi Christian,

I just checked because I remember running into this recently. My svn copy has a try catch, your solution is a little cleaner so I'm changing mine to match your fix.

Thanks,

Joe
You must sign in to post in the forums. This thread is closed to new posts.