Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Deploying Content Types and Inheritence Issues

  Asked By: Judith    Date: Mar 07    Category: Sharepoint    Views: 1391

I'm currently working on a few solutions - one to deploy a site
definition, two features (for web and site scopes), and the last one
is a feature stapler.

Currently it seems like most everything is setup and working
properly, except for my Content Types. I have numerous Content Types
inheriting from the Page Content Type (from Publishing). Well, it
seems like the Publishing Web Feature installs the Page content type
which is being inherited from, except that Content Types can only be
deployed at the Site scope - which causes issues because my CTs
(being at the larger scope) are created before the Page CT is. The
exact error I get is, "File not found."

The Site Definition is setup to activate all the correct Publishing
and Custome features, but I can't seem to fix this problem. If I try
deploying the CT at the Web scope I get an error, "Content Types
cannot be deployed at the Site scope."

What's the best way to fix or get around this issue?



2 Answers Found

Answer #1    Answered By: Ivy Salinas     Answered On: Mar 07

Ok - I've been modifying, remodifying, reorganizing, and testing
pretty much my whole solution and I think I've identified more
closely the issue.

I thought the issue  before was with content  Types, but the problem  is
being caused by the ContentTypeBindings of my Site Feature. I'm
trying to bind several custom content types  to the Pages library
(which is instantiated somewhere in the Publishing features, I
haven't been able to track it down yet).

It looks like the error  I'm getting ("File not found") is because it
can't find the Pages library path I'm giving it in the ListUrl
property of the binding. Not sure how to fix  the problem, but I think
found  out why from MSDN:

"Content type  binding enables you to provision a content type on a
list defined in the onet.xml schema."

In my onet.xml schema, the Pages library/list isn't defined because
it's added by one of the Publishing Features. Does anyone have an
idea on how to fix this? I've tried adding a <List> item in onet.xml
to instantiate a Pages library (at worst thinking it would give me
some form of "already exists" error), but did nothing.

Answer #2    Answered By: Kevin Davis     Answered On: Mar 07

Well I've gotten around this issue  and thought I'd post my results.
The ContentTypeBindings to the Pages library was causing the issues  I
had. I believe this is because the Pages library is created  at the
Web Scope, and Content Type Bindings are set at the Site Scope. Well,
even though MSDN does not list ContentTypeBindings as being at the
Web Scope, they do work there - and that's how I got around this
issue, by moving the CTB's to a Web scoped feature.

(Elements by scope  - http://msdn.microsoft.com/en-

Didn't find what you were looking for? Find more on Deploying Content Types and Inheritence Issues Or get search suggestion and latest updates.