Content Package installation error

Topics: General, Troubleshooting
Jun 7, 2011 at 7:50 PM

I am getting this error when I try to Install a Local Package. 

The package did not validate

A data item of the data interface type 'Composite.Data.Types.IPageFolderDefinition' does already exist

A data item of the data interface type 'Composite.Data.Types.IPageStructure' does already exist

A data item of the data interface type 'Composite.Data.Types.IPageStructure' does already exist

 

The Package was created on my development site to capture all the Content (applications, datatypes data, pages, media), Datatypes and Datatype Items.

Any ideas about this error?

Coordinator
Jun 7, 2011 at 9:04 PM

Sounds like your package contain data that already exist on your website - the packaging system explicitly check it will not overwrite anything and abort during validation (before install) if data overwriting is detected to happen.' There is no "overwrite" option at the moment, you would need to either move new elements only or remove existing elements before installing the package.

Having a "overwrite" option could be a good idea - feel free to propose it is the issue tracker.

Jun 8, 2011 at 2:20 PM
Edited Jun 8, 2011 at 2:48 PM

Here's the process I am using and the results.

For a minimal package, I only added the web pages, templates and   to a package.

I create a fresh C1 web site and choose the "Bare bones" option. C1 Console comes up, I go to the System perspective and to the Local packages folder to do an "Install Local Package". That gets me to the "Ready to install" dialog and I click Next. The installation starts but ends with 2 error msgs indicating a referential integrity failure (because I did not include the Page type, which contains a metadata field my templates depend upon). I now add the Page type to the package. I cannot take a second try at installing this package because I get the  "A data item of the data interface type 'Composite.Data.Types.IPageStructure' does already exist" message on validation.

I scratch install C1 again under wwwroot, choose same options, then repeat the package installation procedure with the updated package. Updated package of course validates now, but still fails with the same referential integrity failure. 

It occurs to me that maybe because I added a custom metadata field to the "Page" page type from the HTML starter site I used for development, there is an issue with this approach. Should I create a custom page type and use that instead of Page?

Russ

Jun 8, 2011 at 6:18 PM

Update:

I went ahead and created a custom page type and used it in all my pages rather than using the starter site types. This helped, but then I noticed several issues.

1) When I built a package and tried to install it on a site built with the Html based starter site, I received the errors in my original post. When I used a Bare bones site, I made better progress, but there were missing pieces. Notably, the Composite.StarterSite.CorporateSite.Core and Composite.StarterSite.CorporateSite.Templates.HtmlBased are missing (not surprisingly) when taking the Bare bones site approach. These two Packages are listed here on CodePlex, but are 404. My work-around was to create a package that included what was essential to my purposes, mainly XSLT funcs and 1 inline function, that were missing.

2) When installing my content/customization package, I received (3) validation errors similar to those reported in my original post. However, I went into ~App_Data/Composite/DataStores and found each corresponding xml file. For example, Composite.Data.Types.IPage_Published.xml already had elements in it, and the validation of my package was causing a error stating that these files were already in existence. The work-around was to leave the root node in place and delete the child elements from these (3) files, then re-try the installation of the package. This worked fine.

For 1), I would call this an oversight, because I cannot be the only one to start with the HTML starter site and need to package-up my content/code to move it to another server environment.

For 2), I consider this a bug, unless there is a way to avoid the issue somehow when packaging your content/code. Seems like merging XML from the source to the destination is a pretty basic code function - assuming this is why the validation kicked this out.

In an enterprise environment, the packaging function is essential and it's important that it be documented better and be a bit less error prone.

Russ

Jun 9, 2011 at 10:20 AM
Edited Jun 9, 2011 at 10:21 AM

When you create package you have to be sure include all dependent items (datatypes!! or install package just when depenedent things are on the place). Make sure you inlcude also files like css, cs. I'd recommend you before install package just check it's install.xml.. and try to understand thing here.. it's pretty easy. So keyword here is analyse. Errors give good info to understand where is the problem. Also.. never install package on the source site - it's will lead to error in 99% cases. Usually you got errors not because there are elements.. but becuase elements with SAME GUID are here... which could be result of installing package to source site or some failed install.

Jun 9, 2011 at 2:04 PM

Aeon, I did include all my dependencies, but I found on further re-testing that some of the problems did not always appear. For example, 2) above did not happen one of the times using the same package and the same clean install process. As I suggested, if the two StarterSite packages would have been available to install, I'm not sure I would have had as much trouble.