2014-03-12 51 views
0

簡短問題:如何解壓縮解壓縮包?編輯Sitecore zip包

我正在使用sitecore 6.6.0(rev。121015)我正在Sitecore中生成一個包。生成一個zip文件(HomePackage.zip)。當我解壓縮一個不同的zip文件時會顯示 - package.zip。當我解壓縮package.zip時,我看到帶有文件的文件夾。

問題:當我用7z壓縮uziped文件夾時,我創建了package.zip文件,然後當我壓縮package.zip文件時,我創建了HomePackage.zip。請注意,我沒有修改任何內容。不幸的是,當我嘗試安裝新創建的包(至於它應該與原始類似),sitecore會拋出異常。下面很多警告的上市:

ManagedPoolThread #3 10:20:51 INFO Cache created: 'rules' (max size: 800KB, running total: 402MB) 
ManagedPoolThread #3 10:20:51 ERROR Error installing items/master/sitecore/content/Home/Products/Europe/Independent Breaks and Mini TRIPS/World War 1 Battlefields/Summer 2015/World War 1 Battlefields/Sightseeing highlights/1 Vimy Ridge/{694AB1C9-F690-445F-9E4A-2F1BD0CC1E09}/en/ 
Exception: System.ArgumentException 
Message: Empty strings are not allowed. 
Parameter name: itemName 
Source: Sitecore.Kernel 
    at Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName) 
    at Sitecore.Data.Engines.DataCommands.AddFromTemplateCommand.Initialize(String itemName, ID templateId, Item destination, ID newId) 
    at Sitecore.Data.Engines.DataEngine.GetAddFromTemplateCommand(String itemName, ID templateId, Item destination, ID newId) 
    at Sitecore.Install.Items.ItemInstaller.CreateLightweightItem(ItemReference item, XmlVersionParser parser) 
    at Sitecore.Install.Items.ItemInstaller.InstallItem(BehaviourOptions installOptions, Item targetItem, ItemReference item, XmlVersionParser parser) 
    at Sitecore.Install.Items.ItemInstaller.GetVersionInstallMode(PackageEntry entry, ItemReference reference, XmlVersionParser parser, ItemInstallerContext context) 
    at Sitecore.Install.Items.ItemInstaller.InstallEntry(PackageEntry entry) 

ManagedPoolThread #3 10:20:51 ERROR Installation failed: System.ArgumentException: Empty strings are not allowed. 
Parameter name: itemName 
    at Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName) 
    at Sitecore.Data.Engines.DataCommands.AddFromTemplateCommand.Initialize(String itemName, ID templateId, Item destination, ID newId) 
    at Sitecore.Data.Engines.DataEngine.GetAddFromTemplateCommand(String itemName, ID templateId, Item destination, ID newId) 
    at Sitecore.Install.Items.ItemInstaller.CreateLightweightItem(ItemReference item, XmlVersionParser parser) 
    at Sitecore.Install.Items.ItemInstaller.InstallItem(BehaviourOptions installOptions, Item targetItem, ItemReference item, XmlVersionParser parser) 
    at Sitecore.Install.Items.ItemInstaller.GetVersionInstallMode(PackageEntry entry, ItemReference reference, XmlVersionParser parser, ItemInstallerContext context) 
    at Sitecore.Install.Items.ItemInstaller.InstallEntry(PackageEntry entry) 
    at Sitecore.Install.Items.ItemInstaller.Flush() 
    at Sitecore.Install.Items.LegacyItemUnpacker.Flush() 
    at Sitecore.Install.Framework.SinkDispatcher.Flush() 
    at Sitecore.Install.Utils.EntrySorter.Flush() 
    at Sitecore.Install.Framework.EntryBuilder.Flush() 
    at Sitecore.Install.Zip.PackageReader.Populate(ISink`1 sink) 
    at Sitecore.Install.Utils.EntrySorter.Populate(ISink`1 sink) 
    at Sitecore.Install.Installer.InstallPackage(String path, Boolean registerInstallation, ISource`1 source, IProcessingContext context) 
    at Sitecore.Install.Installer.InstallPackage(String path, ISource`1 source, IProcessingContext context) 
    at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.AsyncHelper.<Install>b__0() 
    at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.AsyncHelper.CatchExceptions(ThreadStart start) 

我注意到,我創建(內zip文件)的package.zip的兩倍大:

items/master/sitecore/content/Home/Products/Europe/Eastern Europe/Treasures of the Balkans/Summer 2015/Treasures of the Balkans/Itinerary/Day Seventeen/ 
ManagedPoolThread #3 10:20:48 WARN Cannot parse reference 'items/master/sitecore/content/Home/Products/Europe/Eastern Europe/Treasures of the Balkans/Summer 2015/Treasures of the Balkans/Itinerary/Day Nine/{24348D51-7070-4B43-AD4F-E8DA902468E8}/en/1/' 
Exception: System.ArgumentException 
Message: Could not parse the language '1'. Note that a custom language name must be on the form: isoLanguageCode-isoRegionCode-customName. The language codes are two-letter ISO 639-1, and the regions codes are are two-letter ISO 3166. Also, customName must not exceed 8 characters in length. Valid example: en-US-East. For the full list of requirements, see: http://msdn2.microsoft.com/en-US/library/system.globalization.cultureandregioninfobuilder.cultureandregioninfobuilder.aspx 
Source: Sitecore.Kernel 
    at Sitecore.Globalization.Language.Parse(String name) 
    at Sitecore.Install.Items.ItemReference.Parse(String reference) 
    at Sitecore.Install.Items.ItemKeyUtils.GetReference(String key): 

然後是停止一切最終例外原始的package.zip。我如何再次壓縮我的文件夾並重新創建一個包?

請不要問問題:我爲什麼要這樣做,或者如果他們是一種不同的方式來解決我的問題。我很有興趣瞭解我可以使用什麼工具從現有的文件夾結構重新創建一個包。

回答

1

您是否檢查過您的所有物品是否已將其放入您的7zip文件中? Sitecore包內的文件路徑很長。如果你已經將軟件包解壓縮到類似桌面的東西 - 7zip可能會很容易導致你試圖添加的某些項目出現問題,並跳過它們。

據我所知,Sitecore在壓縮/解壓縮這些壓縮文件時並沒有做任何特殊的處理。但我從來沒有詳細研究過這個問題。

+0

謝謝,我相信你是對的,我檢查它,然後我批准你的答案:) –

+0

@Mark Cassidy我手動編輯項目文件在我的c:\驅動器的根目錄,我仍然面臨這個問題。對我而言,使用BeyondCompare直接更新zip文件中的項目而不用提取。致力於使包創建更好:) – phani

相關問題