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

Forums / Developing with Sitefinity / Problems with Products module

Problems with Products module

14 posts, 1 answered
  1. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    09 Jun 2010
    Link to this post
    Hi,


    I am getting the following error as soon as I select the Products module:

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


    I think this is generated in response to this control missing from ControlPanelList.ascx? However I can see I do have createNewButton in my user control. I am using the control templates provided in the code sample so not sure why this isn't working. I'm not sure if there are issues with this module and the version of SiteFinity (3.7) that I am using. I did find that I had to define the following assembly binding in web.config to even get this far...

    <dependentAssembly>
    <assemblyIdentity name="Telerik.Framework" publicKeyToken="dfeaee0e3978ac79"/>
      <bindingRedirect oldVersion="3.2.1616.2" newVersion="3.7.2096.2"/>
    </dependentAssembly>

    Without this I get the following error:

    Could not load file or assembly 'Telerik.Framework, Version=3.2.1616.2, Culture=neutral, PublicKeyToken=dfeaee0e3978ac79' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


    Help appreciated. Thanks.

    Chris.

  2. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    09 Jun 2010
    Link to this post
    Note that I tried creating another generic content based module following the products sample (renaming it to something else, using different meta fields etc). The equivalent page for this module seems to work and if I remove createNewButton from ControlPanelList.ascx I get the following error...

    A required control was not found in the template for "~/Sitefinity/Admin/ControlTemplates/Resources/ControlPanelList.ascx". The control must be assignable form type "System.Web.UI.WebControls.IButtonControl" and must have ID "createNewButton".


    Why does this error contain the path to the control where as the products module error has an empty template path? Does this mean the template is not being picked up and why would this be? Presumably I have missed something.

    I also had to add assembly bindings for Telerik.Cms.Engine and Telerik.Cms.Web.UI to get this other module to work.
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    09 Jun 2010
    Link to this post
    Hi Chris,

    The module is based on the new backend architecture after Sitefinity 3.6. Also you are removing some of the controls which are required for the module to work properly. Since you are creating a GenericContent based module, this module inherits the logic from the base classes - like GenericContent module. When you remove a control from the template and this control is marked as required in the base class an error is produced.

    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.
  4. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    09 Jun 2010
    Link to this post
    Hi Ivan,

    I haven't removed anything from the products module (I haven't changed the products templates at all). I removed the control from my second module just to see what would happen and just thought it might be relevant that the error message was slightly different.
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    09 Jun 2010
    Link to this post
    Hi Chris,

    You need to update the reference assemblies of the Products Module.

    All the best,
    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.
  6. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    09 Jun 2010
    Link to this post
    Hi Ivan,

    I think my references are okay as I created the Telerik.Samples.Products myself, copied in your classes and added the references manually. If I look at the reference properties in Visual Studio I can see that they are all version 3.7.2096.2 (referencing the dll's from the SiteFinity website). It doesn't look like they need to be updated.

    Thanks for your help, but do you have any other ideas?
  7. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    09 Jun 2010
    Link to this post
    To re-cap in case it helps, this is what I have done:

    1. Created Telerik.Samples.Products project with up to date references.
    2. Referenced this project from SiteFinity website.
    3. Added the following to web.config:

    <section name="products" type="Telerik.Samples.Products.Configuration.SectionHandler, Telerik.Samples.Products" requirePermission="false" />

    <modules>
    <!-- Existing modules here -->
    <add type="Telerik.Samples.Products.ProductsModule, Telerik.Samples.Products" />
    </modules>

    <providers>
    <!-- Existing providers here -->
    <add name="Products" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" securityProviderName="" allowVersioning="False" applicationName="/Products" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data" />
    </providers>

    <metafields>
    <!-- Existing meta fields here -->
    <add key="Products.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="Name this product" mandatory="True" />
    <add key="Products.SKU" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
    <add key="Products.Weight" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
    <add key="Products.Price" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
    </metaFields>

    <products defaultGenericProvider="Products">
    <genericContentProviders>
    <add providerName="Products" urlRewriteFormat="[Name].aspx" urlDateTimeFormat="yy- MM-dd" urlWhitespaceChar="_" />
    </genericContentProviders>
    </products>

    4. Copied ~/SiteFinity/Admin/ControlTemplates/Products
    5. Copied ~/SiteFinity/ControlTemplates/Products

    I don't have Telerik.Sitefinity.Configuration.ControlsConfig.xml so there is no explicit mapping to any other templates.
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Jun 2010
    Link to this post
    Hello Chris,

    Attached is a sample project with the latest version of Sitefinity. If you have not mapped anything in cotnrols config file in ~/App_Data/Configuration this means that the controls of products module will use the embedded templates from the assembly.

    Kind regards,
    Radoslav Georgiev
    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.
  9. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    09 Jun 2010
    Link to this post
    Sorry Ivan you've lost me slightly. The products module is a custom module so how can it use templates from the assembly? Your original sample provides products templates but no mappings so I thought these weren't required?

    Could you give me an example of how I would map the product templates? Sounds like it might be worth trying as I'm quite sure that the templates I have from the sample code are not being used (as the createNewButton is definitely there).
  10. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Jun 2010
    Link to this post
    Hello Chris,

    Please take a closer look to the blog post you have linked in your first post. Yest it is a custom module. Custom pluggable module which is built into an assembly.

    Regards,
    Radoslav Georgiev
    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.
  11. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    09 Jun 2010
    Link to this post
    I noticed that SiteFinity was set up in my Visual Studio solution as as a web application rather than a website. I have corrected this and I believe I've followed the instructions in the blog post exactly. Unfortunately I am still seeing the error about the required createNewButton control.

    Perhaps I should submit my solution in a support ticket. Would someone be able to take a look and tell me what I've done wrong?
  12. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    10 Jun 2010
    Link to this post
    Hi Chris,

    You have the working project which I have sent to you. What you can do is to remove the project which is not working from your website (all references to it and its assemblies as well ass any configurations you might have made in the controls config file). Then add a reference to the project I sent you, build your solution and try running it. If this does not work you are welcome to submit a support ticket. We will take a look at the project.

    All the best,
    Radoslav Georgiev
    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.
    Answered
  13. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    10 Jun 2010
    Link to this post
    Ok I will give this a go today. When I looked at the new sample yesterday I saw it was quite different and thought it might be for the CTP release, however looking at the dll's I can see it is for the same version as I am using. Hopefully we will have some joy with this.

    Thanks Ivan.
  14. Chris
    Chris avatar
    87 posts
    Registered:
    11 May 2010
    10 Jun 2010
    Link to this post
    Hi Ivan,

    I have got this working using your updated products module code and web.config. Not exactly sure what was wrong before but I will use this as an example to work off.

    Thanks a lot for your help and your patience.

    Chris.
Register for webinar
14 posts, 1 answered