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

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