Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem with no code Module PackageProblem with no code Module Package
Previous
 
Next
New Post
6/16/2008 8:30 AM
 

I've created a module package following the instructions in this web. The module just shows a label. It works correctly in localhost but it doesn't when I build a "no code" version and try to deploy to a server.

If I'm not authenticated, the label of the module is showed, but also an error: "An error has occurred. Error: ModuleName is currently unavailable." is shown.

When I login as host, I get the following exception:

Error: Etiqueta Mágica is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Tracasa.Modules.EtiquetaMagica.EtiquetaMagicaController.AddEtiquetaMagica(EtiquetaMagicaInfo objEtiquetaMagica) at Tracasa.Modules.EtiquetaMagica.ViewEtiquetaMagica.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

I've realised that when the module is added to a page, the module table is not updated, i.e. Id doesn't insert a new record, what seems to be the problem. But the table and the stored procedures are correctly executed.

What could be happening?

Thanks for your attention.

P.D. I wanted to attach the files but this is not posible, Right?

 
New Post
6/18/2008 4:55 PM
 

Could this error be connected with DotNetNuke version?

Have some of you got to develop a module and to deploy it with just compiled code?

Best regards.

 
New Post
6/19/2008 4:04 AM
 

Hi belitre,

the error you reported doesn't look related to the DNN version, but to an exception raised by the addEtiquetaMagica procedure that is run during the Page_Load. Could you post  the code you are using in both these procedures?

Best regards,
Dario Rossa

 
New Post
6/19/2008 6:55 AM
 

Page_Load:

        protected void Page_Load(System.Object sender, System.EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    if (((string)Settings["template"] != null) && ((string)Settings["template"] != ""))
                        strTemplate = (string)Settings["template"];
                    else
                        strTemplate = Localization.GetString("Template.Text", LocalResourceFile);

                    EtiquetaMagicaController objEtiquetaMagicas = new EtiquetaMagicaController();
                    List<EtiquetaMagicaInfo> colEtiquetaMagicas;

                    //get the content from the EtiquetaMagica table
                    colEtiquetaMagicas = objEtiquetaMagicas.GetEtiquetaMagicas(ModuleId);

                    if (colEtiquetaMagicas.Count == 0)
                    {
                        //add the content to the EtiquetaMagica table
                        EtiquetaMagicaInfo objEtiquetaMagica = new EtiquetaMagicaInfo();
                        objEtiquetaMagica.ModuleId = ModuleId;
                        objEtiquetaMagica.Content = Localization.GetString("DefaultContent", LocalResourceFile);
                        objEtiquetaMagica.CreatedByUser = this.UserId;
                        objEtiquetaMagicas.AddEtiquetaMagica(objEtiquetaMagica);

                        //get the content from the EtiquetaMagica table
                        colEtiquetaMagicas = objEtiquetaMagicas.GetEtiquetaMagicas(ModuleId);
                    }

                    //bind the content to the repeater
                    lstContent.DataSource = colEtiquetaMagicas;
                    lstContent.DataBind();
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }

        }

AddEtiquetaMagica at EtiquetaMagicaController.cs

        public void AddEtiquetaMagica(EtiquetaMagicaInfo objEtiquetaMagica)
        {
            if (objEtiquetaMagica.Content.Trim() != "")
            {
                DataProvider.Instance().AddEtiquetaMagica(objEtiquetaMagica.ModuleId, objEtiquetaMagica.Content, objEtiquetaMagica.CreatedByUser);
            }
        }

AddEtiquetaMagica at SQLDataProvider.cs

        public override void AddEtiquetaMagica(int ModuleId, string Content, int UserID)
        {
            SqlHelper.ExecuteNonQuery(ConnectionString, GetFullyQualifiedName("AddEtiquetaMagica"), ModuleId, Content, UserID);
        }

Stored Procedure at 01.00.00.SqlDataProvider:

create procedure {databaseOwner}{objectQualifier}Tracasa_AddEtiquetaMagica

    @ModuleId       int,
    @Content        ntext,
    @UserID         int

as

insert into {objectQualifier}Tracasa_EtiquetaMagica (
    ModuleId,
    Content,
    CreatedByUser,
    CreatedDate
)
values (
    @ModuleId,
    @Content,
    @UserID,
    getdate()
)

GO

Best regards.

 
New Post
6/19/2008 11:22 PM
 

It looks like the table "Tracasa_AddEtiquetaMagica" is not there. Perhaps the script to create it has not been run?



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem with no code Module PackageProblem with no code Module Package


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out