Troubles with the custom profile functionality.

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
11/3/2009 2:36:53 PM
Gravatar
Total Posts 10

Troubles with the custom profile functionality.

Sorry to keep bugging you, but I'm sure this one's probably blatently obvious.

Still the latest version of mojo running on a windows box with sql server as the database platform.

I added some new fields to the mojoProfile.config file and the fields are showing up on the profile editing page.  However, the labels are not getting pulled from the ProfileResource.resx file.  Am I missing a step.

Here's what I added to the resx file (FYI:  the name="" part is consistently stripped in the copy/paste functionality here):

<data name="VoicePartLabel" xml:space="preserve">
    <value>Voice Part</value>
  </data>
  <data name="VoicePartUnselectedLabel" xml:space="preserve">
    <value />
  </data>
  <data name="VoicePartTenorLabel" xml:space="preserve">
    <value>Tenor</value>
  </data>
  <data name="VoicePartLeadLabel" xml:space="preserve">
    <value>Lead</value>
  </data>
  <data name="VoicePartBassLabel" xml:space="preserve">
    <value>Bass</value>
  </data>
  <data name="VoicePartBaritoneLabel" xml:space="preserve">
    <value>Baritone</value>
  </data>

Then I have this in the mojoProfile.config file:

<add allowMarkup="false" name="VoicePart" labelResourceKey="VoicePartLabel"

lazyLoad="false" requiredForRegistration="false" allowAnonymous="false"

visibleToAnonymous="false" visibleToAuthenticated="true" visibleToUser="true"

editableByUser="true" regexValidationExpression="" regexValidationErrorResourceKey=""

onlyAvailableForRoles="" defaultValue="" includeHelpLink="true">

<OptionList>

<Option value="" TextResourceKey="VoicePartUnselectedLabel"></Option>

<Option value="T" TextResourceKey="VoicePartTenorLabel"></Option>

<Option value="L" TextResourceKey="VoicePartLeadLabel"></Option>

<Option value="Br" TextResourceKey="VoicePartBaritoneLabel"></Option>

<Option value="B" TextResourceKey="VoicePartBassLabel"></Option>

</OptionList>

</add>

But when I view the profile page, I see the label for the field above my new field and no values in the option list.  I did change/save/reload the web.config file, but that didn't seem to help either. 

I guess my big question is - What am I missing??

11/4/2009 3:22:21 PM
Gravatar
Total Posts 18439

Re: Troubles with the custom profile functionality.

Hi,

First, you should not edit the mojoProfile.config file nor should you edit the ProfileResources.resx file because if you do these files will be replaced during upgrade and you will lose your customizations.

You should copy the mojoProfile.config and name it something else like customprofile.config, then you can set this setting in user.config to point to your custom file instead of the included file:

<add key="mojoProfileConfigFileName" value="customprofile.config" />

If you want to localize the labels you can create your own customwhatever.resx file and refer to it in the settings or if you don't care about localizing then just enter the text there and I think it should just show the text if it can't find it as a key in a resource file.

Note also this thread may be of interest.

Hope it helps,

Joe

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