FW: Exception from HRESULT: 0×81070201 when create list in MOSS

來源:互聯網
上載者:User

I'm creating a custom list template as a feature. The problem is that SharePoint can't seem to find my schema.xml for the list. In all examples I have found, the schema.xml file is always placed in a folder directly below the feature folder, with a name identical to the name of the list (as specified in the ListTemplate element). That won't work for me, however. The schema.xml for my list can be found at [featurename]\ListTemplates\[listname]\schema.xml. I have several list templates in my feature and want to organize them in a ListTemplate folder in my feature directory. But that means that SharePoint can't find the files, it seems. Everything works if I place the folder containing my list template schema.xml directly in my feature folder, however. Is it possible to solve this problem? The SDK mentions a Path attribute in the ListTemplate element which can be used to specify an alternative path to the schema.xml, but doesn't really mention what the path should look like...

 The error I get looks like this, by the way:

 Problem:

Exception from HRESULT: 0x81070201   at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateListFromFormPost(String bstrUrl, String& pbstrGuid, String& pbstrNextUrl)
   at Microsoft.SharePoint.Library.SPRequest.CreateListFromFormPost(String bstrUrl, String& pbstrGuid, String& pbstrNextUrl)

Solution:

In my case, I had to name the folder that contained Schema.xml with the same name I used for "Name" attribute in element manifest xml file.

set your Path attribute to be the folder paths containing the folder that has the list name and that contains schema.xml. Almost all of the feature element XML elements have context from the root of the Feature folder under the 12 hive. 

So if your list schema is situated like this: 

CoolestFeatureEver\ListTemplates\listone\schema.xml 

Your path attribute in your ListTemplate that is in the CoolestFeatureEver Feature is Path="ListTemplates".

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.