Firstly sorry about the formatting as the forum is playing up and this is my 10th attempt at posting this so I've unprettied it!
I have just integrated teacommerce into a website and set up all my products after which I realised I'd forgotten to set up my customer and admin emails and GBP and en-GB in the backend, So in the backend I added GBP under currencies and UK under Countries and tried to delete the rest and set all the defaults to the UK and GBP.
I have to admit, I can't remember what order I did it in, but it gave no warnings when trying to delete so I assume it just deleted (even if it shouldnt have).
I now have a few problems:
1- The major one, clicking on "general settings" gives this error:
A column has been specified more than once in the order by list.
Columns in the order by list must be unique.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A column has been specified more than once in the order by list. Columns in the order by list must be unique.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): A column has been specified more than once in the order by list. Columns in the order by list must be unique.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
System.Data.SqlClient.SqlDataReader.get_MetaData() +86
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
System.Data.Common.DbCommand.ExecuteReader() +12
System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) +1266
System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) +113
System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +344
System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() +34
System.Linq.Enumerable.ToDictionary(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +151
TeaCommerce.Data.EmailTemplate.b__e() +2409
Tea.Web.Extension.CacheTools.GetOrAdd(Cache cache, String key, Func`1 retriveValue, CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan relativeExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback) +97
Tea.Web.Extension.CacheTools.GetOrAdd(Cache cache, Func`1 retriveValue, TimeSpan ttl, String key) +82
TeaCommerce.Data.EmailTemplate.GetEmailTemplatesDictionary() +132
TeaCommerce.Admin.Umbraco.plugins.TeaCommerce.Settings.Orders.EditGenerelSettings.OnLoad(EventArgs e) +275
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
2. Denmark keeps reappearing even though I have deleted it.
3. Also not major, but probably related under credit card I have a tab with en-US on it, where I have deleted all things to do with the US.
I also cannot create any emails (I am not sure if this is related to the above problem) but noticed at same time.
If I click to add a new email, type in the name, clicked create and I get this error:
A column has been specified more than once in the order by list. Columns in the order by list must be unique.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A column has been specified more than once in the order by list. Columns in the order by list must be unique.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): A column has been specified more than once in the order by list. Columns in the order by list must be unique.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
System.Data.SqlClient.SqlDataReader.get_MetaData() +86
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
System.Data.Common.DbCommand.ExecuteReader() +12
System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) +1266
System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) +113
System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +344
System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() +34
System.Linq.Enumerable.ToDictionary(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +151
TeaCommerce.Data.EmailTemplate.b__e() +2409
Tea.Web.Extension.CacheTools.GetOrAdd(Cache cache, String key, Func`1 retriveValue, CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan relativeExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback) +97
Tea.Web.Extension.CacheTools.GetOrAdd(Cache cache, Func`1 retriveValue, TimeSpan ttl, String key) +82
TeaCommerce.Data.EmailTemplate.GetEmailTemplatesDictionary() +132
TeaCommerce.Data.EmailTemplate.Save() +1239
TeaCommerce.Admin.Umbraco.plugins.TeaCommerce.Settings.EmailTemplates.CreateEmailTemplate.BtnCreate_Click(Object sender, EventArgs e) +113
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
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) +5563
I know I have experienced this before, but previously I had not done anything else to the site so just started again, but this time I have set up everything else already so really don't want to start again!
Denmark is properly your default country - try select another country, save and then delete Denmark
The other one - cant find any order by code in our sql for that request. Could you try and look in your database if you have two email templates with the same alias or name. Or if you have two email settings for the same template and same country. Also try and restart your website (edit the web.config) and see if that helps - it should clear your cache.
Ok, Denmark was set as the default country. It's now deleted, although still appearing in the Countries table in the DB.
I checked the templates table and it had 4 with the same name, these were the ones I'd been trying to create but kept throwing errors. I have deleted them. Should I have? They hadn't created properly and I had never managed to assign them to anything anyway.
I then attemped to restart the website and clear the cache which I am not completely convinced it has actually done, even though I edited the webconfig, recycled the app pool and restarted the website (just in case!).
Denmark is still in the DB but has a isDeleted=true - because we need the relation for old orders that was completed with that country. The cache is cleared when you recycle the website.
Do you have the most reason release of Tea Commerce installed? Running MSSQL 2005/8?
I am running version 1.4.1.2. I downloaded it the end of last week I think? Also Sql 2008.
Is there any other way of checking if this is a caching issue just incase for some reason it's still caching? or is there any other information I can give you?
I have also checked my umbraco log if that helps and all the errors as far as I can see are the same as above except this one:
Error loading package action 'TeaSpecialVersionActions' for package Tea Commerce: System.NullReferenceException: Object reference not set to an instance of an object. at TeaCommerce.Data.Install.SpecialVersionInstaller.Install() at TeaCommerce.Install.PackageActions.TeaSpecialVersionActions.Execute(String packageName, XmlNode xmlData) at umbraco.cms.businesslogic.packager.PackageAction.RunPackageAction(String packageName, String actionAlias, XmlNode actionXml)
I'm not sure but this may have occured during installation, but I didn't receive any visible errors then.
The error posted happend during install - a lovely umbraco thing :)
When you restart the website it also restarts the cache. But its somehow hen it tries and add it to the cache and the sql that is executed is somehow wrong. Could you try and profile your sql to see what commands it try and execute when it fails. Maybe the sql command can give us an idea
Ok, I have run the profiler and this is the query that is causing the problem:
SELECT [t0].[Id] AS [id], [t0].[Name] AS [name], [t0].[Alias] AS [alias], [t0].[Subject] AS [subject], [t0].[SenderName] AS [senderName], [t0].[SenderAddress] AS [senderAddress], [t0].[CCAddress] AS [ccAddress], [t0].[BCCAddress] AS [bccAddress], [t0].[XsltTemplate] AS [xsltTemplate], [t1].[UmbracoLanguageId] AS [umbracoLanguageId], [t1].[Subject] AS [subject2], [t1].[SenderName] AS [senderName2], [t1].[SenderAddress] AS [senderAddress2], [t1].[CCAddress] AS [ccAddress2], [t1].[BCCAddress] AS [bccAddress2], [t1].[XsltTemplate] AS [xsltTemplate2], (
SELECT COUNT(*)
FROM [dbo].[TeaCommerce_EmailTemplate_rel_umbracoLanguage] AS [t2]
WHERE [t0].[Id] = [t2].[EmailTemplateId]
) AS [value]
FROM [dbo].[TeaCommerce_EmailTemplate] AS [t0]
LEFT OUTER JOIN [dbo].[TeaCommerce_EmailTemplate_rel_umbracoLanguage] AS [t1] ON [t0].[Id] = [t1].[EmailTemplateId]
ORDER BY [t0].[Id], [t1].[Id]
Now I have run this on a db with tea commerce that works and it works and the tables TeaCommerce_EmailTemplate_rel_umbracoLanguage and TeaCommerce_EmailTemplate are the same as far as I can see on the broken one..?? :(
That sounds wierd. Are they identical regarding columns - because they shouldn't be that. If they are I have no idea what has happend. You could try and edit your DB schema so its identical of a working Tea Commerce DB.
Do you have multiple more than 1 language at the broken shop and only 1 in your working site? It must be something with the data then that results in a wrong sql. Try dive into the data and see if you can find something that might cause the problem.
Well I have compared the databases with redgate and the tables are identicle.. so it's not that :(
I have edited the data in the database to make it the same as the working one but with no orders. 1 country, 1 currency, 1 payment method, 1 shipping method, then edited the web config to restart it but still no joy!
Something hugely bizzare is going on here! I'm hoping it's one massive caching issue..!
Will keep fiddling and get back to you...
In the mean time if you have any ideas let me know!
Errors in Backend on General Settings and Emails
Hi
Firstly sorry about the formatting as the forum is playing up and this is my 10th attempt at posting this so I've unprettied it!
I have just integrated teacommerce into a website and set up all my products after which I realised I'd forgotten to set up my customer and admin emails and GBP and en-GB in the backend, So in the backend I added GBP under currencies and UK under Countries and tried to delete the rest and set all the defaults to the UK and GBP.
I have to admit, I can't remember what order I did it in, but it gave no warnings when trying to delete so I assume it just deleted (even if it shouldnt have).
I now have a few problems:
1- The major one, clicking on "general settings" gives this error:
A column has been specified more than once in the order by list. Columns in the order by list must be unique.
2. Denmark keeps reappearing even though I have deleted it.
3. Also not major, but probably related under credit card I have a tab with en-US on it, where I have deleted all things to do with the US.
I also cannot create any emails (I am not sure if this is related to the above problem) but noticed at same time.
If I click to add a new email, type in the name, clicked create and I get this error:
I know I have experienced this before, but previously I had not done anything else to the site so just started again, but this time I have set up everything else already so really don't want to start again!
Can you help?
Becky
doh.. I've just noticed they are both giving the same error.. so didnt need to cut and paste all that twice!
Hi Bex
I will start with the easy one :)
Denmark is properly your default country - try select another country, save and then delete Denmark
The other one - cant find any order by code in our sql for that request. Could you try and look in your database if you have two email templates with the same alias or name. Or if you have two email settings for the same template and same country. Also try and restart your website (edit the web.config) and see if that helps - it should clear your cache.
Kind regards
Anders
Hi Anders
Ok, Denmark was set as the default country. It's now deleted, although still appearing in the Countries table in the DB.
I checked the templates table and it had 4 with the same name, these were the ones I'd been trying to create but kept throwing errors. I have deleted them. Should I have? They hadn't created properly and I had never managed to assign them to anything anyway.
I then attemped to restart the website and clear the cache which I am not completely convinced it has actually done, even though I edited the webconfig, recycled the app pool and restarted the website (just in case!).
In any case I am still getting the same error!
Any more suggestions?
Bex
Denmark is still in the DB but has a isDeleted=true - because we need the relation for old orders that was completed with that country. The cache is cleared when you recycle the website.
Do you have the most reason release of Tea Commerce installed? Running MSSQL 2005/8?
Kind regards
Anders
I am running version 1.4.1.2. I downloaded it the end of last week I think? Also Sql 2008.
Is there any other way of checking if this is a caching issue just incase for some reason it's still caching? or is there any other information I can give you?
I have also checked my umbraco log if that helps and all the errors as far as I can see are the same as above except this one:
Error loading package action 'TeaSpecialVersionActions' for package Tea Commerce: System.NullReferenceException: Object reference not set to an instance of an object. at TeaCommerce.Data.Install.SpecialVersionInstaller.Install() at TeaCommerce.Install.PackageActions.TeaSpecialVersionActions.Execute(String packageName, XmlNode xmlData) at umbraco.cms.businesslogic.packager.PackageAction.RunPackageAction(String packageName, String actionAlias, XmlNode actionXml)
I'm not sure but this may have occured during installation, but I didn't receive any visible errors then.
Bex
The error posted happend during install - a lovely umbraco thing :)
When you restart the website it also restarts the cache. But its somehow hen it tries and add it to the cache and the sql that is executed is somehow wrong. Could you try and profile your sql to see what commands it try and execute when it fails. Maybe the sql command can give us an idea
Kind regards
Anders
Ok, I have run the profiler and this is the query that is causing the problem:
Now I have run this on a db with tea commerce that works and it works and the tables TeaCommerce_EmailTemplate_rel_umbracoLanguage and TeaCommerce_EmailTemplate are the same as far as I can see on the broken one..?? :(
Makes no sense!
That sounds wierd. Are they identical regarding columns - because they shouldn't be that. If they are I have no idea what has happend. You could try and edit your DB schema so its identical of a working Tea Commerce DB.
Do you have multiple more than 1 language at the broken shop and only 1 in your working site? It must be something with the data then that results in a wrong sql. Try dive into the data and see if you can find something that might cause the problem.
Kind regards
Anders
Well I have compared the databases with redgate and the tables are identicle.. so it's not that :(
I have edited the data in the database to make it the same as the working one but with no orders. 1 country, 1 currency, 1 payment method, 1 shipping method, then edited the web config to restart it but still no joy!
Something hugely bizzare is going on here! I'm hoping it's one massive caching issue..!
Will keep fiddling and get back to you...
In the mean time if you have any ideas let me know!
Oh %@&*£!!! :)
Found the problem! the compatibility level of the database had been set to sql 2000 (not by me!)!
Just been doing a bit of a google and other people have had problems with order by when it has two columns with the same name and different alias's!
Phew tho! :)
Hi Bex
Glad you found the problem! Could you mark your own answer as the solution :)
Kind regards
Anders
Thanks for your time Anders!
is working on a reply...