Culture Issue

Arwa Mamoun asked on May 19, 2016 09:44

I face an issue which importing kentico website in to new kentico server, when I go to the site and try to add culture the following error appear to me, could any when help please:

Server Error in '/' Application. Incorrect syntax near ')'. 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: Incorrect syntax near ')'.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

  1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[SqlException (0x80131904): Incorrect syntax near ')'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) +3279580 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +791 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4927 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +92 System.Data.SqlClient.SqlDataReader.get_MetaData() +102 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +552 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3114 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +554 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +98 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +307 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +206 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +182 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +129 CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) +255

SELECT [CultureID] FROM CMS_SiteCulture WHERE (SiteID = )

Caused exception: Incorrect syntax near ')'. ] CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex) +275 CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) +605 CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query) +323 CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query) +461 CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32& totalRecords) +67 CMS.DataEngine.DataQueryBase1.GetDataFromDBInternal() +141 CMS.DataEngine.DataQueryBase1.GetDataFromDB() +103 CMS.DataEngine.DataQueryBase1.GetData() +137 CMS.DataEngine.DataQueryBase1.get_Result() +126 CMS.DataEngine.ObjectQueryBase2.GetResults(IDataQuery query, Int32& totalRecords) +40 CMS.DataEngine.DataQueryBase1.GetDataFromDB() +139 CMS.DataEngine.DataQueryBase1.GetData() +137 CMS.DataEngine.ObjectQueryBase2.GetData() +198 CMS.DataEngine.DataQueryBase1.get_Result() +126 CMS.DataEngine.<Select>d__a1.MoveNext() +70 CMS.Helpers.TextHelper.Join(String separator, IEnumerable items) +163 CMSModules_AdminControls_Controls_UIControls_BindingEditItem.get_CurrentValues() +29 CMSModules_AdminControls_Controls_UIControls_BindingEditItem.Page_Load(Object sender, EventArgs e) +1080 System.Web.UI.Control.OnLoad(EventArgs e) +109 CMS.ExtendedControls.AbstractUserControl.OnLoad(EventArgs e) +71 CMS.PortalControls.CMSAbstractWebPart.OnLoad(EventArgs e) +212 System.Web.UI.Control.LoadRecursive() +68 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Control.LoadRecursive() +165 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4498

Recent Answers


David te Kloese answered on May 19, 2016 09:55

Hi,

It seems for some reason it can't detect your site (or actually site ID)

SELECT [CultureID] FROM CMS_SiteCulture WHERE (SiteID = ) Should include a number.

Is the site correctly configured and running in other cultures? Can you modify the cultures of any other sites in the installation? Is the site just imported or is this site created using import? If so did it complete correctly without errors?

David

0 votesVote for this answer Mark as a Correct answer

Arwa Mamoun answered on May 25, 2016 21:36

Hi David,

yes it is correctly configured and running in English before import this site I was able to add or modify other sites culture. but when importing this website it became not working for all. it is imported and the import is done successfully .

Thanks

0 votesVote for this answer Mark as a Correct answer

adib salhani answered on January 30, 2017 11:43

Have anyone find a solution for this issue? I also face it with the same senario mentioned by @Arwa Mamoun. I have a site configuring and running perfectly under English site. However, I'm getting the same exception when I tried to add another culture from Sites >> Clutures.

Please help me to fix this strage issue. Thank you...

0 votesVote for this answer Mark as a Correct answer

Bruno Trinkao answered on March 23, 2017 14:43 (last edited on March 23, 2017 14:45)

I was having the same issue after importing a Site, even on other Sites which were running perfectly in Kentico 9. Solved running System > Macros > Signature > :Update macro signatures:

Described on Re-signing imported macro expressions

0 votesVote for this answer Mark as a Correct answer

Dave Kay answered on January 9, 2018 01:18 (last edited on January 9, 2018 18:59)

I also have this issue, but it's after upgrade from Kentico 8.1 to Kentico 11. All of the other tabs under Sites seem to work fine, and pull in the SiteID, but the cultures tab throw an exception.

I tried Updating macro signatures, but that doesn't seem to have fixed anything. I also tried (after updating macro signatures) clearing the cache and restarting the application, etc.

Edit: For anyone else that comes across this, I ran the Macro Signature updates a second time (with different settings) and it did indeed resolve my problems. I had to check "Sign all macros", and uncheck "Use the current salt", and pasted the salt from the web.config in.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.