3

We just deployed a new v6 site to a host that has several v4 sites running on it no problem. On the front end, it looks fine, but in the Umbraco admin the Content and Media trees appear empty.

In the browser debugger I can see that there is an error in the TreeDataService.ashx.

The error is below and I'm not exactly sure what the issue is. Is it permissions? Database user permissions?

----------


You must set the singleton 'Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig' to use an sql syntax provider
Parameter name: SqlSyntaxProvider
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.ArgumentNullException: You must set the singleton 'Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig' to use an sql syntax provider
Parameter name: SqlSyntaxProvider

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:

[ArgumentNullException: You must set the singleton 'Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig' to use an sql syntax provider
Parameter name: SqlSyntaxProvider]
   Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig.get_SqlSyntaxProvider() +89
   Umbraco.Core.Persistence.Mappers.BaseMapper.GetColumnName(Type dtoType, PropertyInfo dtoProperty) +57
   Umbraco.Core.Persistence.Mappers.ContentMapper.Map(String propertyName) +67
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.VisitMemberAccess(MemberExpression m) +112
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.Visit(Expression exp) +101
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.VisitBinary(BinaryExpression b) +258
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.Visit(Expression exp) +159
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.VisitLambda(LambdaExpression lambda) +120
   Umbraco.Core.Persistence.Querying.ModelToSqlExpressionHelper`1.Visit(Expression exp) +72
   Umbraco.Core.Persistence.Querying.Query`1.Where(Expression`1 predicate) +20
   Umbraco.Core.Services.ContentService.GetChildren(Int32 id) +312
   umbraco.cms.businesslogic.web.Document.GetChildrenForTree(Int32 NodeId) +39
   umbraco.cms.presentation.Trees.BaseContentTree.Render(XmlTree& Tree) +27
   umbraco.loadContent.Render(XmlTree& tree) +19
   umbraco.presentation.webservices.TreeDataService.LoadTree(TreeRequestParams treeParams) +79
   umbraco.presentation.webservices.TreeDataService.GetXmlTree() +140
   umbraco.presentation.webservices.TreeDataService.ProcessRequest(HttpContext context) +55
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
BenMorel
  • 34,448
  • 50
  • 182
  • 322
BeaverProj
  • 2,205
  • 1
  • 17
  • 31
  • 1
    This ended up being a database related issue. Not anything in Umbraco. – BeaverProj Mar 21 '13 at 17:10
  • ya database providerName issue. – BJ Patel May 13 '13 at 07:45
  • Here's an article on configuring SqlMembershipProvider: [Configuring SqlMembershipProvider with ASP.NET for Umbraco 7.0.3][1] [1]: http://stackoverflow.com/questions/3046860/can-the-sqlmembershipprovider-be-used-with-umbraco/22290393#22290393 – devinbost Mar 10 '14 at 01:03

3 Answers3

17

check you umbraco db connection string.

<add name="umbracoDbDSN"....... 

if it do contains

providerName="System.Data.SqlClient"

then Add it and check. the same. it might start working.

BJ Patel
  • 6,148
  • 11
  • 47
  • 81
0

Problem is that SqlSyntaxProvider is null, my workaround is init it.

var service = new Umbraco.Core.Services.ContentService();
    SqlSyntaxContext.SqlSyntaxProvider = new MySqlSyntaxProvider();
Tony Stark
  • 8,064
  • 8
  • 44
  • 63
  • 2
    This resolved my issue, I am trying to start Umbraco services from a console application and i was missing to create the SqlSyntaxContext. In my case it was SqlServerSyntaxProvider – Jan Hebnes Jun 17 '15 at 20:29
  • also solved my issue when trying to run an import routine from a windows forms application. In my case I only needed the second line from this answer and the first line was causing an exception. Also I had to use SqlServerSyntaxProvider instead of the one for mySQL. – rdans Apr 11 '16 at 10:59
  • @JanHebnes Thank you so much for the pointer to the correct provider for SQL Server. Very helpful. – Christopher Thomas Jan 06 '17 at 10:39
0

The connection string, add name="umbracoDbDSN" ... was missing the following providerName="System.Data.SqlClient"

Once I added that to the line things started working.

PatM
  • 1