понедельник, 15 ноября 2010 г.

Failure when deploy file via module in sharepoint

Проблема: При развертывании файла из модуля, ссылка на файл появляется в библиотеке, но сам файл не создается. Симптомы:
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        g1jj Unexpected Localized content could not be converted from UTF-8 to UTF-16 BSTR, error 0x80070057. 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        g1jk Medium   Generation of localized content (XML=0) for LCID 1049 failed with error 0x80070057. 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        g1ji High     Failed to localize the file file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/Template/Features/TestSite_RsiRssLibrary/KitchenStore/3-.htm while caching ghosted file content. Error 0x80070057. 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        avro High     Relying on fallback logic in VghostPageManager::getGhostDocument() for document: 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\TestSite_RsiRssLibrary\KitchenStore\3-.htm' 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        avro High     Relying on fallback logic in VghostPageManager::getGhostDocument() for document: 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\TestSite_RsiRssLibrary\KitchenStore\3-.htm' 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        avro High     Relying on fallback logic in VghostPageManager::getGhostDocument() for document: 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\Features\TestSite_RsiRssLibrary\KitchenStore\3-.htm' 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        g1jj Unexpected Localized content could not be converted from UTF-8 to UTF-16 BSTR, error 0x80070057. 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        g1jk Medium   Generation of localized content (XML=0) for LCID 1049 failed with error 0x80070057. 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        g1ji High     Failed to localize the file file:///C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/Template/Features/TestSite_RsiRssLibrary/KitchenStore/3-.htm while caching ghosted file content. Error 0x80070057. 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        avro High     Relying on fallback logic in VghostPageManager::getGhostDocument() for document: 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\TestSite_RsiRssLibrary\KitchenStore\3-.htm' 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        avro High     Relying on fallback logic in VghostPageManager::getGhostDocument() for document: 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\TestSite_RsiRssLibrary\KitchenStore\3-.htm' 
11/13/2010 17:44:17.11  vssphost4.exe (0x1C24)                   0x2FB4 SharePoint Foundation          General                        avro High     Relying on fallback logic in VghostPageManager::getGhostDocument() for document: 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\Features\TestSite_RsiRssLibrary\KitchenStore\3-.htm' 


Как решить: Сохраняйте файл в кодировке UTF-8. Соответственно к бинарным файлам это не относиться. Пример кода:
<Module Name="KitchenStoreFiles" Url="KitchenStore" RootWebOnly="FALSE" Path="KitchenStore\" xmlns="http://schemas.microsoft.com/sharepoint/">
  <File Path="3-.htm" Url="меню-понедельник.htm" Type="GhostableInLibrary">      
  </File>
 </Module>


1 комментарий:

Анонимный комментирует...

Excellent. It resolved my issue today. I identified a problematic file using SharePoint logs. I saved it as UTF8 in notepad. It resolved feature activation issue. Feature activation was uploading this file to a library.