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: 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
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?
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
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"
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
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.)
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:
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.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)
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:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
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
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
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
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?
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
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"
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
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
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
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
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
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
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
I'll look in to that, thanks very much for the advice Rich
Dom
thanks Rich
I zipped up the files and transfered them to my friend Pc and it worked :o)
is working on a reply...