Error when modifying product catalog sample module
hi, currently i'm modifying product catalog module, i'm removing quantity, price and whatisinthebox field.
things run smoothly until i try to add new product and publish it. it throw js error "There was an error deserializing the object of type Telerik.Sitefinity.Web.Services.ContentItemContext`1[[MyNameSpace.Model.ProductItem, MyNameSpace, Version=1.0.4120.29178, Culture=neutral, PublicKeyToken=null]]. The value '' cannot be parsed as the type 'Int64'."
here's the json parameter that being sent
"Item":"AllowComments":"false","AllowTrackBacks":null,"ApproveComments":false,"AvailableLanguages":[],"DateCreated":"\/Date(1302683015531)\/","DefaultPageId":null,"Description":"Value":"","EmailAuthor":false,"ExpirationDate":null,"LastModifiedBy":"00000000-0000-0000-0000-000000000000","OriginalContentId":"00000000-0000-0000-0000-000000000000","Owner":"61a3f37d-fbae-42b6-9b66-090b0518fc6e","PostRights":1,"PublicationDate":"\/Date(1302683025279)\/","Status":["1f5435a0-b4fc-4336-b32a-2549b1d5f552"],"Title":"Value":"product 1","UIStatus":0,"UrlName":"Value":"product-1","Version":0,"ViewsCount":0,"Visible":false,"VotesCount":0,"VotesSum":0,"ApprovalWorkflowState":"Value":"","Content":"Value":"description","Parent":null,"Category":[],"Tags":[],"LastModified":"\/Date(1302683101983)\/"
I am also getting an error when modifying the product catalog sample. I removed the same three fields, and added one new field (Product ID). I also removed the "Colors" taxonomy from the ProductsDefinition.cs file.
The files I changed were:
Model/ProductItem.cs
Web/UI/Public/ProductsDefinitions.cs
Web/Services/Data/ProductItemViewModel.cs
Data/ProductsManager.cs
The list view loads successfully, but when I try to add a new product using FireFox and click on Publish I get a javascript alert box that says "Return Code: 0". In IE, the AJAX loaded just spins and I never get an error. When I tried debugging this using Fiddler, I instead got an alert box that said "Undefined".
Hi Chris,
Can you check if one of these fields has left in the ProductsManager.cs and its method Copy() ? If yes, you should delete it there too. Also, please make sure that the new fields are Lstrings.
You can also try to update to the new versions of the modules. After you've upgraded Sitefinity to 4.1, you can follow the these steps below to upgrade the custom modules.
<
PropertyGroup
>
<
OpenAccessPath
>C:\tfs\SitefinityProject\Sitefinity 4.0\OfficialSDK\Content\Common\Dependencies\</
OpenAccessPath
>
</
PropertyGroup
>
<
Import
Condition
=
"Exists('$(OpenAccessPath)\OpenAccess.targets')"
Project
=
"$(OpenAccessPath)\OpenAccess.targets"
/>