+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / 3.7 SP4 broke Question and Answer for User Creation

3.7 SP4 broke Question and Answer for User Creation

3 posts, 0 answered
  1. Abraham
    Abraham avatar
    29 posts
    Registered:
    11 Aug 2010
    13 Oct 2010
    Link to this post
    I must have done something incorrectly when I upgraded from 3.7 SP3 to 3.7 SP4.  When I try to create a new user in Sitefinity -> Administration -> Users, I get the following error after clicking the "Create this user button":

    A required control was not found in the template for "". The control must be assignable form type "System.Web.UI.IEditableTextControl" and must have ID "Question".


    Here is the related section from web.config:
    <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType="">
          <providers>
            <clear/>
            <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess"
                 enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/>
          </providers>
        </membership>

    If I set requiresQuestionAndAnswer to false, I can create the user without an error, but that does not allow me to set the Question and Answer for the user.  This worked before in 3.7 SP3.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    13 Oct 2010
    Link to this post
    Hello Abraham,

    Inside Sitefinity/Admin/CmsAdmin/Users.aspx file add the following controls

    <li>
        <cc2:FieldLabel ID="Question1" runat="server" Text="Question" TargetID="Question">
        </cc2:FieldLabel>
        <asp:TextBox ID="Question" runat="server"></asp:TextBox>
    </li>
    <li>
        <cc2:FieldLabel ID="Answer1" runat="server" Text="Answer" TargetID="Answer">
        </cc2:FieldLabel>
        <asp:TextBox ID="Answer" runat="server"></asp:TextBox>
    </li>

    Inside <InsertTemplate> of ManageUsers control


     </div>
        <cc1:ManageUsers runat="server" ID="manageUsers">
            <ListTemplate>
                <cc2:MessageControl runat="server" ID="message">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="messageText"></asp:Label>
                    </ItemTemplate>
                </cc2:MessageControl>
                <div class="ToolsAll">
                    <asp:LinkButton ID="createNew" CommandName="CreateNew" runat="server" CssClass="CmsButLeft new">
                        <strong class="CmsButRight light">
                            <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:CreateUser %>" /></strong></asp:LinkButton>
                    <div class="searchItems">
                        <div class="searchInputs">
                            <asp:Label ID="Label1" AssociatedControlID="SearchField" Text="<%$ Resources:SearchUsersBy %>"
                                runat="server"></asp:Label>
                            <asp:DropDownList ID="searchField" runat="server">
                            </asp:DropDownList>
                            <asp:Label ID="Label2" AssociatedControlID="SearchWords" Text="<%$ Resources:For %>"
                                runat="server"></asp:Label>
                            <asp:TextBox ID="searchWords" CssClass="searchString" runat="server"></asp:TextBox>
                            <asp:Button ID="searchButton" CommandName="Search" Text="<%$ Resources:Search %>"
                                runat="server" CssClass="searchButton" />
                        </div>
                    </div>
                    <div class="clear">
                        <!-- -->
                    </div>
                </div>
                <div class="workArea">
                    <h2 id="gridTitle" runat="server" class="gridTitle">
                        <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:AllUsers %>" /></h2>
                    <div class="groupActions" runat="server" id="groupActions">
                        <span class="cmstextlbl"><asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:SelectAndAction %>" /></span>
                        <asp:LinkButton runat="server" ID="unassignSelected" CssClass="unassign" />
                        <span class="cmstextlbl"> | </span>
                        <asp:LinkButton runat="server" ID="deleteSelected" Text="<%$ Resources:Delete %>" CssClass="delete" CommandName="DeleteSelected" OnClientClick="return confirm('Are you sure you want to delete this user?');" />
                        <span class="cmstextlbl">or</span>
                        <asp:DropDownList runat="server" ID="actionsList"></asp:DropDownList>
                    </div>
                    <asp:GridView ID="GridView1" AllowPaging="true" AllowSorting="true" PageSize="20"
                        AutoGenerateColumns="false" GridLines="none" CssClass="listItems" runat="server">
                        <Columns>
                            <asp:TemplateField ItemStyle-CssClass="check">
                                <HeaderTemplate>
                                    <asp:CheckBox ID="checkAll" runat="server" /></HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="rowCheck" /></ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="UserName" SortExpression="UserName" HeaderText="Username"
                                HeaderStyle-CssClass="GridHeader_SiteFinity">
                                <ItemStyle CssClass="gridContentTitle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Email" SortExpression="Email" HeaderText="Email" HeaderStyle-CssClass="GridHeader_SiteFinity" />
                            <asp:BoundField DataField="CreationDate" SortExpression="CreationDate" HeaderText="Creation Date"
                                HeaderStyle-CssClass="GridHeader_SiteFinity" DataFormatString="{0:dd MMM yyyy, hh:mm}"
                                HtmlEncode="false" />
                            <asp:ButtonField ButtonType="Link" CommandName="Select" Text="Profile" AccessibleHeaderText="Profile">
                                <ItemStyle CssClass="gridActions" />
                            </asp:ButtonField>
                            <asp:ButtonField ButtonType="Link" CommandName="Delete" Text="Delete" AccessibleHeaderText="Delete">
                                <ItemStyle CssClass="gridActions delete" />
                            </asp:ButtonField>
                        </Columns>
                    </asp:GridView>
                </div>
            </ListTemplate>
            <InsertTemplate>
                <cc2:MessageControl runat="server" ID="message">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="messageText"></asp:Label>
                    </ItemTemplate>
                </cc2:MessageControl>
                <div class="ToolsAll">
                    <div class="backWrapp">
                        <asp:LinkButton CommandName="Cancel" runat="server" ID="LinkButton2" CssClass="actions back"
                            CausesValidation="false">
                            <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:BackToUsers %>" /></asp:LinkButton>
                    </div>
                </div>
                <div class="workArea">
                    <div class="mainForm">
                        <p class="mand">
                            *
                            <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:MandatoryFields %>" /></p>
                        <h3><asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:MembershipInfo %>" /></h3>
                        <fieldset class="userinfo set">
                            <ol class="setIn">
                                <li>
                                    <cc2:FieldLabel ID="lblUserName" runat="server" Text="<%$ Resources:Username %>"
                                        TargetID="UserName">
                                    </cc2:FieldLabel>
                                    <asp:TextBox ID="UserName" runat="server" ValidationGroup="CreateUser"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                        ErrorMessage="Username is required." ToolTip="Username is required." ValidationGroup="CreateUser"
                                        Display="Dynamic" SetFocusOnError="true" CssClass="validMessage">
                                        <strong>
                                            <asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:UsernameRequired %>" /></strong></asp:RequiredFieldValidator>
                                </li>
                                <li>
                                    <cc2:FieldLabel ID="lblPassword" runat="server" Text="<%$ Resources:Password %>"
                                        TargetID="Password">
                                    </cc2:FieldLabel>
                                    <asp:TextBox ID="Password" runat="server" TextMode="Password" ValidationGroup="CreateUser"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                        ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUser"
                                        Display="Dynamic" CssClass="validMessage">
                                        <strong>
                                            <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:PasswordRequired %>" /></strong></asp:RequiredFieldValidator>
                                </li>
                                <li>
                                    <cc2:FieldLabel ID="lblConfirmPassword" runat="server" Text="<%$ Resources:ConfirmPassword %>"
                                        TargetID="ConfirmPassword">
                                    </cc2:FieldLabel>
                                    <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" ValidationGroup="CreateUser"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                        ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
                                        ValidationGroup="CreateUser" Display="Dynamic" CssClass="validMessage">
                                        <strong>
                                            <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:ConfirmPassRequired %>" /></strong></asp:RequiredFieldValidator>
                                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                        ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                        ValidationGroup="CreateUser" CssClass="validMessage">
                                        <strong>
                                            <asp:Literal ID="Literal12" runat="server" Text="<%$ Resources:PasswordMatch %>" /></strong></asp:CompareValidator>
                                </li>
                                <li>
                                    <cc2:FieldLabel ID="lblEmail" runat="server" Text="<%$ Resources:Email %>" TargetID="Email">
                                    </cc2:FieldLabel>
                                    <asp:TextBox ID="Email" runat="server" ValidationGroup="CreateUser"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Email"
                                        ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUser"
                                        Display="Dynamic" CssClass="validMessage">
                                        <strong>
                                            <asp:Literal ID="Literal13" runat="server" Text="<%$ Resources:EmailRequired %>" /></strong></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="Email"
                                        Display="Dynamic" ErrorMessage="The email format is invalid." ValidationExpression="\S+@\S+\.\S+"
                                        ValidationGroup="CreateUser" CssClass="validMessage">
                                        <strong>
                                            <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:EmailNotValid %>" /></strong></asp:RegularExpressionValidator>
                                </li>
                                 
                                         <li>
                                            <cc2:FieldLabel ID="Question1" runat="server" Text="Question" TargetID="Question">
                                            </cc2:FieldLabel>
                                            <asp:TextBox ID="Question" runat="server"></asp:TextBox>
                                        </li>
                                        <li>
                                            <cc2:FieldLabel ID="Answer1" runat="server" Text="Answer" TargetID="Answer">
                                            </cc2:FieldLabel>
                                            <asp:TextBox ID="Answer" runat="server"></asp:TextBox>
                                        </li>        
                            </ol>
                        </fieldset>


    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Abraham
    Abraham avatar
    29 posts
    Registered:
    11 Aug 2010
    13 Oct 2010
    Link to this post
    Thanks.  That worked.
Register for webinar
3 posts, 0 answered