Sitefinity ASP.NET CMS - Content Management System

Support Forum Thread

Home >  Support >  Forums home > Sitefinity 3.x > Modules > Creating New Module

Reply
lamees, 6/12/2007 3:23:02 AM
Hello everyone,
I created a new module to add to a sitefinity website. Could you please specify in details the steps that I should do In order to make the module appear on the modules page and to be usable. And also what are the lines that should be written in web.config file to register that new module?
Thanks in advance

Reply
, 6/12/2007 6:34:31 AM
Hello lamees,

You should modify your web.config file as follows:

1.
<configSections>

            <sectionGroup name="telerik">

<section name="contacts"         type="Sample.Contacts.Configuration.SectionHandler, Sample.Contacts" requirePermission="false"/>

            </sectionGroup>

</configSections>

Sample.Contacts is the name of the project. SectionHandler is the class inheriting the base class ConfigurationSection and contains the functionality for loading and accessing the contacts section information.

2.
<framework>

  <modules>

<add type=" Sample.Contacts.ContactsModule, Sample.Contacts"/>

  </modules>

</framework>

ContactsModule is the class, providing substantial information for your custom module.

3.
<telerik>

   <contacts defaultProvider="Sitefinity">

      <providers>

        <clear/>

        <add name="Sitefinity" securityProviderName="" type="Sample.Contacts.Data.DefaultProvider, Sample.Contacts.Data" connectionStringName="DefaultConnection" visible="true" />

      </providers>

   </contacts>

</telerik>

Sample.Contacts.Data is the data project for the module and DefaultProvider is the class providing an implementation for the provider model.

Finally, you should copy  Sample.Contacts.Data.dll and Sample.Contacts.dll to the bin folder in your web site.

Greetings,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
lamees, 6/12/2007 8:14:34 AM
hello Pepi,
    First of all thanks for your quick and helpful reply.
but could you please attach this Contacts module so that i can compare to my module?
thanks again

Reply
, 6/12/2007 10:37:17 AM
CustomModule.rar
Hi lamees,

Have a look at the attachment; it contains an implementation of a simple custom module and a template for contacts permissions; this template is used by ControlPanel custom control.

For more information you can examine the implementation of Jobs Intra Site module which is a part of the Sitefinity installation. Also, you will find useful instructions for building a module in this Sitefinity blog: http://sitefinity.wordpress.com/

Hope this information helps.

Kind regards,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
fregas baratis, 6/15/2007 3:48:49 PM
Is all this configuration something new in the final release of Sitefinity 3.0?  I dont remember having to do so in the beta or RC versions.
Reply
, 6/18/2007 5:21:46 AM
Hi fregas,

You are right; these configurations are new. You should follow the instructions in the previous post to add a custom module to your site.

Hope this helps.

Regards,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Imran, 7/4/2007 5:56:00 AM

Hello

I put Sample.Contact folders into my project and added the bits to my config, but I got the following error:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure “Telerik.Resources.Messages.resources” was correctly embedded or linked into assembly “Telerik.Framework” at compile time, or that all the satellite assemblies required are loadable and fully signed.


Any ideas ?

Reply
, 7/4/2007 8:34:57 AM
Hello Imran,

This problem typically occurs if you use resources that don’t exist. The error message is not enough to help you. So could you please send us your project and database and we will try to figure out what is wrong?
Thanks for your cooperation.

All the best,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Imran, 7/4/2007 10:45:25 AM

Hi Pepi

Thanks for the reply. We are having lots of problems upgrading to the new release of Sitefinity. We released our site using RC1 and we created 38 backend modules which are all working perfectly. Now with this upgrade, we cant even get your Sample.Contact module to work.

Please can you provide an email address or a suitable method for me to send you our site. Hopefully you can provide a feasible solution so we can make those 38 modules work. Any help would be appreciated.

Many thanks.


Reply
, 7/4/2007 11:32:12 AM
Hello Imran,

Please log in your Client.net account and open a new support ticket. Zip and attach your project and database to it. You can remove the RadControls folder from the archive to shorten the file.

All the best,
Rebecca
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Sunny Patel, 7/19/2007 4:20:41 PM

Hi,

I am creating a pluggable module based on the sample Contacts module. When I try to test it, I get the following error.

Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Telerik.Resources.Messages.resources" was correctly embedded or linked into assembly "Telerik.Framework" at compile time, or that all the satellite assemblies required are loadable and fully signed

It seems like the problem is very similar to what Imran faced. Is there a solution to it?

Thanks

Sunny

Reply
, 7/23/2007 6:02:36 AM
Hello Sunny,

PROBLEM: We've managed to reproduce the problem by simply copying the .dll files to a bin folder of a web site and then registering the module in the web.config. Namely, since the Contacts module references Sitefinity assemblies (such as Telerik.Framework, Telerik.Cms.Web.UI, etc), it is necessary that those referenced files are of the same version as the one of your web site. So, since I have referenced files on my machine, you can't just add .dll files and that's where the problem is.

SOLUTION: Add the Sample.Contacts and Sample.Contacts.Data projects to your web site and in effect create a solution. Delete the Sample.Contacts.dll and Sample.Contacts.Data.dll from your bin folder if they are still there. Add these two projects as references to your web site. Lastly, open the references for both projects and reference your dlls. So, in Sample.Contacts you need to replace the references of Telerik.Cms.Web.UI, Telerik.Framework and Telerik.Security with the references to those assemblies in your bin folder. Same thing you need to do for Sample.Contacts.Data: replace Nolics.Engine.v4.2, Telerik.DataAccess, Telerik.Framework.

Hope this helps.

Regards,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Charles, 7/31/2007 1:36:20 PM
The sample contact module failed when I click Add new contact

Exception Details: System.Web.HttpException: A required control was not found in the template for "Sample.Contacts.WebControls.Admin.ContactEditor+ContactEditorContainer". The control must be assignable form type "System.Web.UI.Control" and must have ID "cancel".

Also
Command panel test label is empty.

Wher can I download a full feature sample module including template .ascx?

Thanks

Reply
, 8/1/2007 4:32:40 AM
Hi Charles,

It’s necessary to create your own templates. You can find some screenshots in Sitefinity blog . Also, there is useful information for implementing user interface in Developers Manual.

Hope this helps.

Best wishes,
Pepi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Damian, 3/27/2008 12:22:29 PM

Hi Pepi,

I followed your steps to fix the problem by adding the described references, I now get the following, Please can you help me.

Damian

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load type 'Telerik.Utilities.CodeBenchmarkTextFileProvider' from assembly 'Telerik.Framework'.

Source Error:

Line 127:        <add name="Simple Web Event Provider" type="Telerik.Utilities.TextFileWebEventProvider,Telerik.Framework" logFileName="~/App_Data/sitefinity.log" />
Line 128:        <add name="Simple Web Buffered Event Provider" type="Telerik.Utilities.BufferedTextFileWebEventProvider,Telerik.Framework" bufferMode="Notification" logFileName="~/App_Data/sitefinity.log" />
Line 129:        <add name="Code Benchmark Provider" type="Telerik.Utilities.CodeBenchmarkTextFileProvider,Telerik.Framework" enabled="False" logFileName="~/App_Data/performance.log" />
Line 130:      </providers>
Line 131:      <rules>

Source File: C:\Program Files\telerik\Sitefinity3.2\WebSites\intranet\web.config    Line: 129


Reply
, 3/28/2008 10:28:05 AM
Hi Damian,

Did you try the newer version of the Contacts module? There are new implementations and so I recommend you to look at the Developer Manual, section Modules-> Custom Modules -> Pluggable Modules -> Building the Contacts Pluggable Module . There, you could find the newest version of the Contacts module along with instructions on building it. Also, please look at the following Sitefinity forum thread: Pulling Shared Content into a Module - it provides a simpler implementation of a pluggable module.

Let us know if you need further assistance.


Regards,
Sonya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center