In Commerce admin section I try to create a new product, for example "Test Poduct" (Products->Create) And I see create product window. I check Manufacturer and type in "Test Poduct" as Product Name and push create. After it I find error:
Application server error '/'.
DateTime conversion from symbol string error
SubSonic.SqlQueryException: DateTime conversion from symbol string error (Ошибка преобразования datetime из символьной строки).
When I create more detalied debug, i find, that error comes from CommerceTasks.cs file of CommerceForUmbraco.adminSection project:
int successOrNot = new SubSonic.Insert().Into(Product.Schema).Values( Alias ,System.Guid.NewGuid().ToString() ,Alias ,Alias ,manufacturerId ,DBNull.Value ,1 ,1 ,1 ,1 ,1 ,DBNull.Value ,0 ,0 ,0 ,SiteConfig.CurrencyCode.ToString() ,"each" ,DBNull.Value ,0 ,0 ,0 ,"each" ,0 ,99 ,4 ,1 ,DBNull.Value ,SubSonic.Utilities.Utility.FormatDate(DateTime.Now, true) ,"Commerce For Umbraco" , SubSonic.Utilities.Utility.FormatDate(DateTime.Now, true) , "Commerce For Umbraco") .Execute(); - SqlQueryException
What I need to eliminate this error to add new products using admin section UI
Also I find: if I delete SubSonic.Utilities.Utility.FormatDate from function (type in only DateTime.Now) then recompile commerce project and update libraries, all work. What u can say about this decision of this problem?
int successOrNot = new SubSonic.Insert().Into(Product.Schema).Values( Alias ,System.Guid.NewGuid().ToString() ,Alias ,Alias ,manufacturerId ,DBNull.Value ,1 ,1 ,1 ,1 ,1 ,DBNull.Value ,0 ,0 ,0 ,SiteConfig.CurrencyCode.ToString() ,"each" ,DBNull.Value ,0 ,0 ,0 ,"each" ,0 ,99 ,4 ,1 ,DBNull.Value ,DateTime.Now, true ,"Commerce For Umbraco" , DateTime.Now, true , "Commerce For Umbraco") .Execute(); - SqlQueryException
As it seems you've already found. It appears that SubSonic does not support the culture you have set (which is it?). I'd recommend looking at the SubSonic forums which are hosted at http://www.StackOverflow.com
Thanks for your reply, Paul. I also think, that my error connected to culture ( I use Russian Windows XP) and FormatDate function, but what if I use DateTime.Now instead
I'm not clear what the question is? In any case I'd recommend not using the SubSonic FormatDate function as your cluture does not appear to be supported.
Commerce4Umbraco - Problem while creating Product
Hi again!
I also find this problem:
In Commerce admin section I try to create a new product, for example "Test Poduct" (Products->Create) And I see create product window. I check Manufacturer and type in "Test Poduct" as Product Name and push create. After it I find error:
Application server error '/'.
DateTime conversion from symbol string error
SubSonic.SqlQueryException: DateTime conversion from symbol string error (Ошибка преобразования datetime из символьной строки).
Row 68: typeInstance.Alias = Text;
Row 69: typeInstance.UserId = BasePages.UmbracoEnsuredPage.GetUserId(BasePages.UmbracoEnsuredPage.umbracoUserContextID);
Row 70: typeInstance.Save();
Stack trace:Row 71:
Row 72: // check for returning url
Source file: D:\UmIntegrator\umbraco 4.0.1 commerce\umbraco\presentation\umbraco\create\dialogHandler_temp.cs Row: 70
[SqlQueryException: DateTime conversion from symbol string error.] SubSonic.Insert.Execute() +293 CommerceForUmbraco.adminSection.tasks.ProductTasks.InsertProduct() +1990 CommerceForUmbraco.adminSection.tasks.ProductTasks.Save() +44 umbraco.presentation.create.dialogHandlertemp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) in D:\UmIntegrator\umbraco 4.0.1 commerce\umbraco\presentation\umbraco\create\dialogHandlertemp.cs:70 CommerceForUmbraco.adminSection.commerce.CreateProduct.sbmt_Click(Object sender, EventArgs e) +168 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
int successOrNot = new SubSonic.Insert().Into(Product.Schema).Values( Alias ,System.Guid.NewGuid().ToString() ,Alias ,Alias ,manufacturerId ,DBNull.Value ,1 ,1 ,1 ,1 ,1 ,DBNull.Value ,0 ,0 ,0 ,SiteConfig.CurrencyCode.ToString() ,"each" ,DBNull.Value ,0 ,0 ,0 ,"each" ,0 ,99 ,4 ,1 ,DBNull.Value ,SubSonic.Utilities.Utility.FormatDate(DateTime.Now, true) ,"Commerce For Umbraco" , SubSonic.Utilities.Utility.FormatDate(DateTime.Now, true) , "Commerce For Umbraco") .Execute(); - SqlQueryExceptionWhen I create more detalied debug, i find, that error comes from CommerceTasks.cs file of CommerceForUmbraco.adminSection project:
What I need to eliminate this error to add new products using admin section UI
Also I find: if I delete SubSonic.Utilities.Utility.FormatDate from function (type in only DateTime.Now) then recompile commerce project and update libraries, all work. What u can say about this decision of this problem?
int successOrNot = new SubSonic.Insert().Into(Product.Schema).Values( Alias ,System.Guid.NewGuid().ToString() ,Alias ,Alias ,manufacturerId ,DBNull.Value ,1 ,1 ,1 ,1 ,1 ,DBNull.Value ,0 ,0 ,0 ,SiteConfig.CurrencyCode.ToString() ,"each" ,DBNull.Value ,0 ,0 ,0 ,"each" ,0 ,99 ,4 ,1 ,DBNull.Value ,DateTime.Now, true ,"Commerce For Umbraco" , DateTime.Now, true , "Commerce For Umbraco") .Execute(); - SqlQueryExceptionHi -
Pretty sure you're running into an issue with SubSonic date formatting:
As it seems you've already found. It appears that SubSonic does not support the culture you have set (which is it?). I'd recommend looking at the SubSonic forums which are hosted at http://www.StackOverflow.com
-Paul
Thanks for your reply, Paul. I also think, that my error connected to culture ( I use Russian Windows XP) and FormatDate function, but what if I use DateTime.Now instead
What Problems can comes?
I'm not clear what the question is? In any case I'd recommend not using the SubSonic FormatDate function as your cluture does not appear to be supported.
-Paul
Thanks, I ask exactly about it.
Paul, can u tell me something about my thread about deleting actions in Commerce admn section?
http://our.umbraco.org/forum/getting-started/questions-about-runway-and-modules/3311-Commerce4Umbraco---Error-while-deleting-product
is working on a reply...