Sitecore / Reference-Storefront

Sitecore Reference Storefront
Other
25 stars 20 forks source link

TDS Common_Master project doesn't compile #3

Open derekport opened 8 years ago

derekport commented 8 years ago

Package Builder fails causing the project to fail.

Adding item sitecore\content\Storefront\Global\Mails.item to package 5> Inner Exception Failed to load version 1 for language en(System.Exception): 5> at Sitecore.Data.Serialization.ObjectModel.SyncVersion.ReadVersion(Tokenizer reader) 5> at Sitecore.Data.Serialization.ObjectModel.SyncItem.ReadItem(Tokenizer reader, Boolean assertVersion) 5> Exception Error reading item: /sitecore/content/Storefront/Global/Mails/ForgotPassword(System.Exception): 5> at Sitecore.Data.Serialization.ObjectModel.SyncItem.ReadItem(Tokenizer reader, Boolean assertVersion) 5> at Sitecore.Update.Data.Items.ContentDataItem.GetItem() 5> at Sitecore.Update.Data.Items.ContentDataItem.get_DatabaseName() 5> at HedgehogDevelopment.SitecoreProject.PackageBuilder.PackageBuilder.0(List1 ?, 0 ?, String ?, IEnumerable1 ?, HashSet`1 ?) 5> at HedgehogDevelopment.SitecoreProject.PackageBuilder.PackageBuilder.0(0 ?) 5> at HedgehogDevelopment.SitecoreProject.PackageBuilder.k.0(String[] ?)

SorenKerrn commented 8 years ago

What version of TDS are you running? It works with version 5.1.9 for VS 2013, which is what we have been using.

Could you please try to open the file in a text editor and validate that the content looks proper? It could be related to EOL issue or the "chinese-looking characters" reported in issue #2 "Unknown characters in GlobalSuppression.cs files #2", see https://github.com/Sitecore/Reference-Storefront/issues/2

DThrasher commented 8 years ago

I have the same issue. It does not appear to be related to the "chinese-looking characters" problem that affects the Global Suppression.cs files described in issue #2.

I ran the UnixToWIndowsEOL.ps1 script, and that didn't help.

There is another item file affected by this problem as well: sitecore\content\Storefront\Home\Account Management.item

Excluding both Mails.item and Account Management.item from the project will allow the solution to build.

derekport commented 8 years ago

I can't download TDS 5.1.9 but I pulled 5.1.11. It still fails with the same compile error.

I added the item file. I had to rename it to a .txt so it can be uploaded.

DThrasher's solution does seem to allow the solution to compile. The obvious problem remains that we then won't have these items in our update packages.

Before I pulled down the source I configured my git repo settings as outlined in the Dev guide on GetHub. I too had the GlobalSuppression.cs issue. But I manually removed all the junk.

Mails.txt

akamburov commented 8 years ago

Has this been resolved?

Here is some feedback from TDS support:

The "Failed to load version 1 for language" error is usually from a corrupted .item file after a source control check-in or merge and/or improper line endings introduced by Git.

For the Git problem, you need to add a git attribute as described in Sean’s blog post: http://seankearney.com/post/Using-Team-Development-for-Sitecore-with-GitHub.aspx

After you do this, the items in question need to be removed entirely and re-synced/get from Sitecore!

For the item corruption, removing the items and re-introducing them to the TDS project once again should fix the problem.

SorenKerrn commented 8 years ago

It should have been solved. A new version of the source code files was pushed to the repository where the file formats have been fixed. It's tagged 8.1.478.2

deepak19 commented 3 years ago

facing the same issue:

Inner Exception Failed to load version 1 for language en-US(System.Exception): at Sitecore.Data.Serialization.ObjectModel.SyncVersion.ReadVersion(Tokenizer reader) at Sitecore.Data.Serialization.ObjectModel.SyncItem.ReadItem(Tokenizer reader, Boolean assertVersion) Exception Error reading item: /sitecore/content/Sites/**/Data/Commerce/Account/Change Password(System.Exception): at Sitecore.Data.Serialization.ObjectModel.SyncItem.ReadItem(Tokenizer reader, Boolean assertVersion) at Sitecore.Update.Data.Items.ContentDataItem.GetItem() at Sitecore.Update.Data.Items.ContentDataItem.get_DatabaseName() at HedgehogDevelopment.SitecoreProject.PackageBuilder.PackageBuilder.GetSitecoreItemCommands(List1 cmds, BuildContext ctx, String projectFileFolder, Project sourceTDSProject, HashSet1 includedItems) at HedgehogDevelopment.SitecoreProject.PackageBuilder.PackageBuilder.BuildPackage(BuildContext ctx) at HedgehogDevelopment.SitecoreProject.PackageBuilder.Program.Main(String[] args)