Error in page Admin/ManageUsers.aspx when using custom profile

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/13/2008 10:38:48 AM
Gravatar
Total Posts 20

Error in page Admin/ManageUsers.aspx when using custom profile

Joe,

I am working on implementing a custom profile for what will become a customer's site.  I created the profile (MyProfile.config) and added a reference to it in user.config, according to the documentation on this site.   On Secure/Register.aspx, all fields required for registration are visible.  On ProfileView.aspx, all fields are visible.  On Secure/UserProfile.aspx, the user can edit the fields I have marked as editable by user.

I then went to test if the administrator could edit the fields which are not editable by the user.  On the Member List page, I clicked the gear icon next to the new user's name.  Instead of taking me to an edit page as I expected, I got the following error:

Server Error in '/mojoPortal' Application.
Multiple controls with the same ID 'dp' were found. FindControl requires that controls have unique IDs.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Multiple controls with the same ID 'dp' were found. FindControl requires that controls have unique IDs.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Multiple controls with the same ID 'dp' were found. FindControl requires that controls have unique IDs.]
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +220
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.EnsureNamedControlsTable() +57
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +106
System.Web.UI.Control.FindControl(String id) +9
System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(String name, String propertyName) +30
System.Web.UI.WebControls.BaseValidator.ControlPropertiesValid() +37
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +33
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

I am running mojoPortal v. 2.2.7.7.  When I use the default profile page, I can visit Admin/ManageUsers.aspx and edit profile properties as I expected.  I have the log files from this if you need it.

Lorien

11/13/2008 10:40:36 AM
Gravatar
Total Posts 20

Re: Error in page Admin/ManageUsers.aspx when using custom profile

Forgot to mention above: I am using MS SQL Server 2005.

Lorien

11/13/2008 11:37:45 AM
Gravatar
Total Posts 18439

Re: Error in page Admin/ManageUsers.aspx when using custom profile

Each profile property must have a unique name with no spaces in the name. This error makes me think you have a duplicated property name.

If you are sure you don't have any duplicates, please email me your custom profile config file so I can debug it. joe dot audette at gmail dotcom.

Hope it helps,

Joe

11/13/2008 11:53:13 AM
Gravatar
Total Posts 20

Re: Error in page Admin/ManageUsers.aspx when using custom profile

The file is on its way.

I thought the same thing about duplicate property names, but I have confirmed that all my property names are unique, and contain no spaces.

A few property names only differ by a digit at the end of the property name.  Could this be causing the error?

Lorien

11/13/2008 12:14:21 PM
Gravatar
Total Posts 18439

Re: Error in page Admin/ManageUsers.aspx when using custom profile

Hi Lorien,

I was able to produce the problem on my machine and fix the bug. I will be making a new release next week, but if you are working with the source code you can fix it in Web/Components/mojoProfilePropertyDefinition.cs, just uncomment the line of code at line 553:
datePicker.ID = "dp" + propertyDefinition.Name;

Thanks for reporting this.

Best,

Joe

11/13/2008 1:21:07 PM
Gravatar
Total Posts 20

Re: Error in page Admin/ManageUsers.aspx when using custom profile

I made the change as you suggested, and when I log in as administrator, I can now edit all the profile fields.

Many thanks for your help!

 

Lorien

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