Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dominic Brown 91 posts 111 karma points
    Jul 04, 2011 @ 12:14
    Dominic Brown
    0

    Create/Install Own Packages

    Morning all (again!)

    I've been looking around all morning but not found anything that really helpful on this one.

    I have attempted to create my own package and i've downloaded it but i cannot install it. Can someone please advise?

     

    I get this error message:

     

    Server Error in '/' Application.

    Error running NonQuery:
    SQL Statement:
    insert into cmsContentTypeAllowedContentType (id,AllowedId) values (1057,1060)

    Exception:
    System.Data.SqlServerCe.SqlCeException: A duplicate value cannot be inserted into a unique index. [ Table name = cmsContentTypeAllowedContentType,Constraint name = PK_cmsContentTypeAllowedContentType ]
      at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
      at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
      at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
      at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
      at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters)

    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: SqlCE4Umbraco.SqlCeProviderException: Error running NonQuery:
    SQL Statement:
    insert into cmsContentTypeAllowedContentType (id,AllowedId) values (1057,1060)

    Exception:
    System.Data.SqlServerCe.SqlCeException: A duplicate value cannot be inserted into a unique index. [ Table name = cmsContentTypeAllowedContentType,Constraint name = PK_cmsContentTypeAllowedContentType ]
      at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
      at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
      at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
      at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
      at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters)

    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:

    [SqlCeProviderException: Error running NonQuery: 
    SQL Statement:
    insert into cmsContentTypeAllowedContentType (id,AllowedId) values (1057,1060)
    
    Exception:
    System.Data.SqlServerCe.SqlCeException: A duplicate value cannot be inserted into a unique index. [ Table name = cmsContentTypeAllowedContentType,Constraint name = PK_cmsContentTypeAllowedContentType ]
       at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
       at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
       at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
       at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
       at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters)]
       SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters) +579
       SqlCE4Umbraco.SqlCEHelper.ExecuteNonQuery(String commandText, SqlCeParameter[] parameters) +21
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +85
    
    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +140
       umbraco.cms.businesslogic.ContentType.set_AllowedChildContentTypeIDs(Int32[] value) +305
       umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) +3056
       umbraco.presentation.developer.packages.Installer.processInstall(String currentStep) +179
       umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) +401
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +91
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +14
       System.Web.UI.Control.LoadRecursive() +74
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  • Rich Green 2246 posts 4008 karma points
    Jul 04, 2011 @ 12:24
    Rich Green
    0

    Hey Dominic,

    This is a complete guess but are you trying to install the package over the site you created the package from?

    Seems like the package is trying to insert a duplicate record, so if you're not doing so I would try installing into a clean install.

    Rich

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 04, 2011 @ 12:24
    Dirk De Grave
    0

    Sounds as if you're installing your own package on a site from which you're creating the package. Error says you can't set the allowed doc type to be a child of another doc type, probably because it's already defined. Have you tried installing it on a clean install?

     

    Cheers,

    /Dirk

  • Dominic Brown 91 posts 111 karma points
    Jul 04, 2011 @ 12:29
    Dominic Brown
    0

    thanks for your replies

    I created the package (altho i am not sure i've done this correctly)

    then i created a page via webmatrix, web gallery, CMS. Went through the set up process, i didn't install a package. this gave me a new link, which i went to and tried to install the package from there

    Hope this helps

  • Daniel Bardi 927 posts 2562 karma points
    Jul 04, 2011 @ 12:41
    Daniel Bardi
    0

    Are you using the same database.. Rick and Dirk have good suggestions.

    Did you install a sample site?  this would create the default site structure... (possibly same as the site you built the package on)... make sense?

    Can you post a screenshot of the package details?

  • Dominic Brown 91 posts 111 karma points
    Jul 05, 2011 @ 10:26
    Dominic Brown
    0

    Hi,

    yeah i have just been using the free easy db install method as i am a total noob and do not know how to do it any other way lol

    What screenshots would you like? shall i go through what i did and take one of each screen or is that information overload?

    thanks for your help

  • Dominic Brown 91 posts 111 karma points
    Jul 05, 2011 @ 14:53
    Dominic Brown
    0

    the main thing where i do not know what i need to do is in the "Package Files" tab, "Remember: .xslt and .ascx files for your macros will be added automaticly, but you will still need to add assemblies, images and script files manually to the list below"

  • Rich Green 2246 posts 4008 karma points
    Jul 05, 2011 @ 18:12
    Rich Green
    0

    Hey Dominic,

    The package files is simply a way of adding any files you might reference in your package, like images, javascript files, css files etc.

    Umbraco has no way of knowing if you need these included or not so you have to add them to your package if needed.

    Hope this helps

    Rich

  • Dominic Brown 91 posts 111 karma points
    Jul 05, 2011 @ 18:19
    Dominic Brown
    0

    Thanks, i just don't know which ones to add lol

    Am i best going through the developer section and making a note of all the names of the stylesheets, images etc and then add them?

    Thanks again and sorry for being such a noob

  • Rich Green 2246 posts 4008 karma points
    Jul 05, 2011 @ 18:22
    Rich Green
    0

    Hey Dominic,

    No problem.  I think it might be easier if you can tell us what package are you trying to create does or what it is.

    I get the feeling there's some misunderstanding going on here.

    Rich

     

  • Dominic Brown 91 posts 111 karma points
    Jul 05, 2011 @ 18:29
    Dominic Brown
    0

    ok, more then likely lol

    i'll explain what i'm doing/done.

    I have created a basic website at home, used a personal package and changed things around and added a few things. I want to be able to send this to someone else so they can import it and see what i have done on their computer in their home.

    I thought if i created a package i could download that, send it to them, they could install the package and see what i've done

  • Rich Green 2246 posts 4008 karma points
    Jul 05, 2011 @ 18:36
    Rich Green
    0

    Hey Dominic,

    Yep, sounds about right.

    Though if it was me, I would just back up the database and zip up the web files and send them the whole thing.

    But, in theory you should be able to achieve what you're trying to do.

    Basically you need to tick every box (doc types etc.) and then send the package over. Package files you might need, have you installed any 3rd party dlls (some packages have these etc.)

    Rich

     

  • Dominic Brown 91 posts 111 karma points
    Jul 05, 2011 @ 18:57
    Dominic Brown
    0

    I just used the free simply database option, can i do it with that?

    no, i have not installed anything other then the starter package

    thanks

    dom

  • Rich Green 2246 posts 4008 karma points
    Jul 05, 2011 @ 19:18
    Rich Green
    0

    If you used the SQL CE database then you could simply Zip up the whole web directory and send that instead.

    Then your friend would just need to set it up as a site in IIS and you're done.

    Rich

  • Dominic Brown 91 posts 111 karma points
    Jul 05, 2011 @ 19:22
    Dominic Brown
    0

    I'll look in to that, thanks very much for the advice Rich

     

    Dom

  • Dominic Brown 91 posts 111 karma points
    Jul 10, 2011 @ 10:04
    Dominic Brown
    0

    thanks Rich

    I zipped up the files and transfered them to my friend Pc and it worked :o)

Please Sign in or register to post replies

Write your reply to:

Draft