U7.01 build 200 "Failed to retrieve data for application tree content"
Hi,
This may have been reported before, but I just did a clean Umbraco 7.01 build 200 install and on first opening the Umbraco backoffice I see this error and the Content Tree is empty.
I Chrome's developer tools I can see a server call returned a 500 with the following response.
)]}',
{"Message":"An error has occurred.","ExceptionMessage":"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[user] = 0)' at line 3","ExceptionType":"MySql.Data.MySqlClient.MySqlException","StackTrace":" at MySql.Data.MySqlClient.MySqlStream.ReadPacket()\r\n at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)\r\n at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)\r\n at MySql.Data.MySqlClient.MySqlDataReader.NextResult()\r\n at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)\r\n at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)\r\n at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in c:\\Code\\github\\SamSaffron\\MiniProfiler\\StackExchange.Profiling\\Data\\ProfiledDbCommand.cs:line 235\r\n at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()\r\n at Umbraco.Core.Persistence.Database.d__7`1.MoveNext() in f:\\TeamCity\\buildAgent\\work\\e1a0ddf7a1349eaf\\src\\Umbraco.Core\\Persistence\\PetaPoco.cs:line 778\r\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at Umbraco.Core.Services.UserService.GetUserSections(IUser user) in f:\\TeamCity\\buildAgent\\work\\e1a0ddf7a1349eaf\\src\\Umbraco.Core\\Services\\UserService.cs:line 170\r\n at Umbraco.Web.Security.WebSecurity.UserHasAppAccess(String app, IUser user)\r\n at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)\r\n at System.Web.Http.AuthorizeAttribute.OnAuthorization(HttpActionContext actionContext)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.System.Web.Http.Filters.IAuthorizationFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Web.WebApi.HttpControllerContextExtensions.d__11.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Web.WebApi.HttpControllerContextExtensions.d__11.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Web.WebApi.HttpControllerContextExtensions.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Web.Trees.ApplicationTreeExtensions.d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__17.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__4.MoveNext()"}
Hope this gets fixed soon, because I am really anxious to start using the new Umbraco.
I am having the same issue. VS 2012, installed umbraco using nuget, MYSQL 5.6.14 . Same error when opening the backoffice. I do not see this issue in the buglist of 7.0.1. Any resolutions?
To Elaborate.. when I create the following injection module.
public class ModuleLoader : ApplicationEventHandler
{
protected override void ApplicationInitialized(
UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
var builder = new ContainerBuilder();
//Register the UmbracoContext as a factory since the below controllers
//require this in their ctor
builder.Register(c => UmbracoContext.Current).AsSelf();
builder.RegisterType<SimpleAes>();
builder.RegisterType<Captcha>().As<ICaptcha>();
builder.RegisterType<ContactProcessor>();
//Register the current assembly (since these are in App_Code which are dynamic assemblies)
builder.RegisterControllers(Assembly.GetExecutingAssembly());
builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
var container = builder.Build();
//setup the webapi dependency resolver to use autofac
var resolver = new AutofacWebApiDependencyResolver(container);
GlobalConfiguration.Configuration.DependencyResolver = resolver;
//setup the mvc dependency resolver to user autofac
DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
}
}
Then my webapi injections start working. But I get the tree loading error. When I disable. My webapi endpoints are broken, But the tree works again.
How did you solve. It obvious that I am overriding something I should not in my module loader. Just not sure what?
This issue still exists in Umbraco 7.0.2. Just did a fresh install and when I go to create a new doc type or template I get this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[user] = 0' at line 1
Stack Trace:
[MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[user] = 0' at line 1]
MySql.Data.MySqlClient.MySqlStream.ReadPacket() +276
MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) +68
MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId) +17
MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +110
MySql.Data.MySqlClient.MySqlDataReader.NextResult() +761
MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1699
MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) +68
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +12
Umbraco.Core.Persistence.<Query>d__7`1.MoveNext() +265
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +381
System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
umbraco.BusinessLogic.User.GetApplications() +223
Umbraco.Web.UI.LegacyDialogTask.ValidateUserForApplication() +36
Umbraco.Web.UI.LegacyDialogHandler.UserHasCreateAccess(HttpContextBase httpContext, User umbracoUser, String nodeType) +37
Umbraco.Web.UI.Umbraco.CreateDialog.SecurityCheck(String nodeTypeAlias) +71
Umbraco.Web.UI.Umbraco.CreateDialog.OnLoad(EventArgs e) +50
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
It looks like the query will need to be edited. There have been some other similar issues in the code. Please open a new ticket at issues.umbraco.org documenting the problem.
I'm experiencing this issue in Umbraco 7.0.4 backoffice when trying to view some of my nodes in the Content section.
It's only some of the nodes that throws this error. I have tried creating a new node of the same document type, but now get:
Server error: Contact administrator, see log for full details. Failed to retreive data for empty content item type Frontpage
What I've tried so far: - Make changes to the document type and save it - Rolling back the node to previous versions - Republishing the node - Republishing entire site - Deleting everything in App_Data - Restarting App Pool - Node is also in Recycle bin. Tried to move to back to content with no luck
In dev tools in Chrome I can see that the API throws a 500 internal server error:
{"Message":"An error has occurred.","ExceptionMessage":"Sequence contains no matching element","ExceptionType":"System.InvalidOperationException","StackTrace":" at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)\r\n at Umbraco.Web.Models.Mapping.TabsAndPropertiesResolver.ResolveCore(IContentBase content)\r\n at AutoMapper.ValueResolver`2.Resolve(ResolutionResult source)\r\n at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)\r\n at AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(ResolutionContext context, IMappingEngineRunner mapper, Object mappedObject, PropertyMap propertyMap)"}
Anyone have an idea what to do? This error is pretty critical for me :/
Im getting this error in 7.1.0 It get in when trying to load Developer and Members
everyting else semes to work :)
{"Message":"An error has occurred.","ExceptionMessage":"Value cannot be null.\r\nParameter name: umbracoContext","ExceptionType":"System.ArgumentNullException","StackTrace":" at Umbraco.Web.WebApi.UmbracoApiController..ctor(UmbracoContext umbracoContext)\r\n at Umbraco.Web.Trees.ApplicationTreeExtensions.TryGetRootNodeFromLegacyTree(ApplicationTree appTree, FormDataCollection formCollection, UrlHelper urlHelper, String currentSection)\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__4.MoveNext()"}
Edit
Okay i can see in the network trafik that the parameter tree is emthy does enyone know what is?
Have you tried clearing the browser cache by setting debug to true in the web.config and having the inspector tool from chrome open, while you browse the back-office?
Also try to remove the temporary client dependency files in /app_data/temp/clientdependency and increment the version number in /config/ClientDependency.config
I am experiencing the same issue in a clean install of Umbraco 7.1.1. All sections work except Developer and Members sections. I have tried clearing the browser cache, client dependency etc. It also seems like once the error is received in the browser, the Umbraco backend 'dies' - or at least it is no longer possible to switch section.
I have attached a screen shot of what I see in my browser.
I hope others are experiencing the same issue and that we can find a solution.
FWIW, I am running Umbraco version 7.1.4 assembly: 1.0.5261.28127. I encountered this problem after deleting a Document Type that was at the root of document types and had child document types - in essence deleting a few doc types at once. After that I started getting the "Failed to retrieve data for application tree content" error.
Unfortunately, I didn't do a backup of the database before deleting the doc types so I couldn't go back. I ended up poking around in the database and found some orphaned records in cmsDocument that were still pointing at one of the old document types that was removed.
I ended up deleting the records in the cmsDocument table that were pointing to this old document type and then everything started working again. (caveat emptor: I don't know if this is the right thing to do or if this orphaned other records, but it seems ok so far)
I would suspect that the error "Failed to retrieve data for application tree content" can happen in a lot of different scenarios so my guess is that my problem was one of a few different possibilities, but I hope it helps anyone that might be in the same situation.
I'm sorry Ayo, I didn't save the queries and I can't recall exactly where they were. I am on a deadline right now, but I can try and reproduce the problem next week if you still need the help. Let me know.
I've had this same problem today, in the end I traced it down to some rogue data in cmsContentType2ContentType whereby there were some child/parent references to doctypes that had been deleted. I ran the following to clear out the duff data:
DELETE FROM cmsContentType2ContentType
WHERE childContentTypeId NOT IN (SELECT nodeId FROM cmsContentType)
DELETE FROM cmsContentType2ContentType
WHERE parentContentTypeId NOT IN (SELECT nodeId FROM cmsContentType)
Goes without saying that you should always back up your DB first! ;-)
U7.01 build 200 "Failed to retrieve data for application tree content"
Hi,
This may have been reported before, but I just did a clean Umbraco 7.01 build 200 install and on first opening the Umbraco backoffice I see this error and the Content Tree is empty.
I Chrome's developer tools I can see a server call returned a 500 with the following response.
Hope this gets fixed soon, because I am really anxious to start using the new Umbraco.
I am using Mysql 5.x
Ah, I just found a duplicate of this issue: http://our.umbraco.org/forum/ourumb-dev-forum/bugs/46329-Umbraco-7-MySQL-datatype-error
This is a problem specific to Mysql. I didn't encounter this problem on MSSQL.
I am having the same issue. VS 2012, installed umbraco using nuget, MYSQL 5.6.14 . Same error when opening the backoffice. I do not see this issue in the buglist of 7.0.1. Any resolutions?
Thx
The issue is reported here:
http://issues.umbraco.org/issue/U4-3780
This problem was fixed in the source code on December 5. 7.0.1 Nightly Build 200 was created before the fix was applied.
The build server is stalling at the moment due to some msbuild config changes, working on it
I meet this problem although my database is SQL Server 2008R2. It happend when i try to add Autofac
@Trung Vu - I'm pretty sure your problem is not related to the issue with MySQL database. You need to create a registration for the WebAPI in order to resolve webservices with autofac. Take a look at this: http://blogs.msdn.com/b/roncain/archive/2012/07/16/dependency-injection-with-asp-net-web-api-and-autofac.aspx
Best regards Martin
(I have just solved it with Castle Windsor myself)
This seems to be my issue as well.
To Elaborate.. when I create the following injection module.
Then my webapi injections start working. But I get the tree loading error. When I disable. My webapi endpoints are broken, But the tree works again.
How did you solve. It obvious that I am overriding something I should not in my module loader. Just not sure what?
This issue still exists in Umbraco 7.0.2. Just did a fresh install and when I go to create a new doc type or template I get this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[user] = 0' at line 1
Stack Trace:
What is the fix / work arround for this?
It looks like the query will need to be edited. There have been some other similar issues in the code. Please open a new ticket at issues.umbraco.org documenting the problem.
I'm experiencing this issue in Umbraco 7.0.4 backoffice when trying to view some of my nodes in the Content section.
It's only some of the nodes that throws this error.
I have tried creating a new node of the same document type, but now get:
Server error: Contact administrator, see log for full details.
Failed to retreive data for empty content item type Frontpage
What I've tried so far:
- Make changes to the document type and save it
- Rolling back the node to previous versions
- Republishing the node
- Republishing entire site
- Deleting everything in App_Data
- Restarting App Pool
- Node is also in Recycle bin. Tried to move to back to content with no luck
In dev tools in Chrome I can see that the API throws a 500 internal server error:
http://site.local/umbraco/backoffice/UmbracoApi/Content/GetById?id=1073
)]}',
{"Message":"An error has occurred.","ExceptionMessage":"Sequence contains no matching element","ExceptionType":"System.InvalidOperationException","StackTrace":" at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)\r\n at Umbraco.Web.Models.Mapping.TabsAndPropertiesResolver.ResolveCore(IContentBase content)\r\n at AutoMapper.ValueResolver`2.Resolve(ResolutionResult source)\r\n at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)\r\n at AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(ResolutionContext context, IMappingEngineRunner mapper, Object mappedObject, PropertyMap propertyMap)"}
Anyone have an idea what to do? This error is pretty critical for me :/
Im getting this error in 7.1.0
It get in when trying to load Developer and Members
everyting else semes to work :)
Edit
Okay i can see in the network trafik that the parameter tree is emthy does enyone know what is?
Update: the first time i load the developer section it works... but every time after that i get a the error message :/
Hi Kim
How did you do the install?
Have you tried clearing the browser cache by setting debug to true in the web.config and having the inspector tool from chrome open, while you browse the back-office?
Also try to remove the temporary client dependency files in /app_data/temp/clientdependency and increment the version number in /config/ClientDependency.config
Hope this helps.
/Jan
Hi Jan,
I am experiencing the same issue in a clean install of Umbraco 7.1.1. All sections work except Developer and Members sections. I have tried clearing the browser cache, client dependency etc. It also seems like once the error is received in the browser, the Umbraco backend 'dies' - or at least it is no longer possible to switch section.
I have attached a screen shot of what I see in my browser.
I hope others are experiencing the same issue and that we can find a solution.
Best regards and thanks a lot in advance :)
Kim
Hi i found the solution :-) when you start your project do it in .net 4.5 or newer.
That worked for me:-)
Hi Kim,
I am running in .Net 4.5, so unfortunately it seems the issue is in that version of .Net as well :(
I am running it using the webserver in Visual Studio. Could that be the reason for the issue?
Cheers,
Kim
I'm running Umbraco 7.1.1, encontering this issue using when using Autofac, if I disable autofac, I don't get the problem... Can't work it out.
My problem on Umbraco 7.1.4 was that I had tab named the same way on parent and child document type.
Now works.
Has anyone actually found a solution for this that works?
I'm asking just like Fabio: Anyone found a solution here? I see the same problem in the Members section on a umbraco 7.1.6
FWIW, I am running Umbraco version 7.1.4 assembly: 1.0.5261.28127. I encountered this problem after deleting a Document Type that was at the root of document types and had child document types - in essence deleting a few doc types at once. After that I started getting the "Failed to retrieve data for application tree content" error.
Unfortunately, I didn't do a backup of the database before deleting the doc types so I couldn't go back. I ended up poking around in the database and found some orphaned records in cmsDocument that were still pointing at one of the old document types that was removed.
I ended up deleting the records in the cmsDocument table that were pointing to this old document type and then everything started working again. (caveat emptor: I don't know if this is the right thing to do or if this orphaned other records, but it seems ok so far)
I would suspect that the error "Failed to retrieve data for application tree content" can happen in a lot of different scenarios so my guess is that my problem was one of a few different possibilities, but I hope it helps anyone that might be in the same situation.
Hi Doug - I'm having exactly the same problem as you. I deleted some content, and some doc types and now all the trees in the back office a broken.
Can you share some SQl queries you used to fix this?
Particularity - How to select all orphaned records that might need deleting.
I have been looking through the db tables and its a little confusing on what I need to delete.
Thanks Ayo
I'm sorry Ayo, I didn't save the queries and I can't recall exactly where they were. I am on a deadline right now, but I can try and reproduce the problem next week if you still need the help. Let me know.
Thanks Doug, its ok I managed to fix it....
Ask me did I save the quires.. :-) Forgot, I should have and posted it here.
Next time. - Thanks for your help.
I've had this same problem today, in the end I traced it down to some rogue data in cmsContentType2ContentType whereby there were some child/parent references to doctypes that had been deleted. I ran the following to clear out the duff data:
Goes without saying that you should always back up your DB first! ;-)
This was in Umbraco 7.1.4
is working on a reply...