U4-3780 - 7.0.0: Application Trees Don't Load

Created by Brian Powell 03 Dec 2013, 19:08:00 Updated by Shannon Deminick 09 Dec 2013, 21:52:04

Under MySQL, the backend in 7.0.0 won't load any application trees. I can see the different sections (Content, Media, Users, Developer), but when I click on them there are no child elements.

When I first sign in, I get an error that "Failed to retreive data for application tree content". The trace log doesn't give me much useful other than that MySQL threw an exception. I can't figure out where exactly the exception is coming from. I've told MySQL to log the queries and tried re-running the queries logged myself but they appear to work correctly, although many return empty sets.

I've encountered this problem on both a brand new 7.0.0 site and one I upgraded from 6.1.6 to 7.0.0.

Any ideas or at least a suggestion where I should start poking in the source code?

Comments

Brian Powell 04 Dec 2013, 13:20:30

I have worked out a fix for this. There is a query that checks user permissions which incorrectly enclosed a field name in brackets. I'll submit a pull request with a fix later today.


Brian Powell 04 Dec 2013, 15:55:34

I added the fix for this to my existing MySQL-related pull request #262.

https://github.com/umbraco/Umbraco-CMS/pull/262


Julius 09 Dec 2013, 14:33:51

This issue still exists in 7.0.1 build 200.

This is the error that is returned for the call:

)]}', {"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__71.MoveNext() in f:\\TeamCity\\buildAgent\\work\\e1a0ddf7a1349eaf\\src\\Umbraco.Core\\Persistence\\PetaPoco.cs:line 778\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 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](IEnumerable1 source, Func2 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, Func1 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.TaskAwaiter1.GetResult()\r\n at Umbraco.Web.Trees.ApplicationTreeController.d__4.MoveNext()"}

Error is reported on the forums here: http://our.umbraco.org/forum/getting-started/installing-umbraco/46674-U701-build-200-Failed-to-retrieve-data-for-application-tree-content


Brian Powell 09 Dec 2013, 14:46:00

The 200 build was made before the fix was applied to the source.


Shannon Deminick 09 Dec 2013, 21:51:13

Hi Brian, the build server hasn't been running the last few days, as you say build 200 was created before the fix. If you test build 211 the fix should be applied there, let us know if that doesn't work for you.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.0.0

Due in version: 7.0.1

Sprint:

Story Points:

Cycle: