U4-11167 - U7.10 Document Type not loading - syncTree error.

Created by Arjan Woldring 30 Mar 2018, 12:36:48 Updated by Andreas Fallman 10 Aug 2018, 07:24:17

Tags: PR

Is duplicated by: UAAS-715

Is duplicated by: U4-11191

Relates to: U4-11192

What did you do?

  • Go to Info tab (content item)
  • Click the open link to the associated Doc Type.
  • Keeps on loading

What did you expect to happen?

  • Just show the Doc Type :)

What actually happened?

  • Keeps on loading
  • Console error:

angular.min.js?cdv=2:63 TypeError: mainTreeEventHandler.syncTree is not a function at Object.syncTree (umbraco.services.js?cdv=2:5244) at syncTreeNode (umbraco.controllers.js?cdv=2:7100) at umbraco.controllers.js?cdv=2:6977 at i (angular.min.js?cdv=2:79) at angular.min.js?cdv=2:80 at Object.$eval (angular.min.js?cdv=2:92) at Object.$digest (angular.min.js?cdv=2:90) at Object.$apply (angular.min.js?cdv=2:92) at j (angular.min.js?cdv=2:101) at r (angular.min.js?cdv=2:104)

4 Attachments

Comments

Arjan Woldring 30 Mar 2018, 12:52:25

Now testing in a clean U7.10 install...


Dave Woestenborghs 30 Mar 2018, 13:01:07

I'm not able to reproduce this in the latest source (7.10) with the starter kit installed.


Arjan Woldring 30 Mar 2018, 13:24:53

Okay, tested in the latest 7.10 (without your PR Dave)

I Have the same issue in the clean Umbraco 7.10. And again this is not all the time.

  1. I went to users-section to change the language. I immediately got this error: "Could not find the tree users, activeTree has not been set" see screenshot.

  2. On a Document Type, open up console in chrome and did a Cache refresh en Force reload. And I again had this error. Which is the initial issue/error.

edit: the second issue, is not very important as everything keeps on working. But the first issue is pretty annoying as it keeps on loading and it seems that it happens also on Content. not only Doctypes.


Dave Woestenborghs 30 Mar 2018, 13:33:05

@arjan what browser are you using ?


Arjan Woldring 30 Mar 2018, 13:38:03

I'm using Chrome. And what I do to test is this:

  1. F12 (open console)
  2. Right click on the Refresh Icon (the one on top and before the Address bar)
  3. Choose Delete Cache and Force Reload.


Arjan Woldring 30 Mar 2018, 13:39:39

This just happened when changing content, and doing a Force reload.


Arjan Woldring 30 Mar 2018, 13:51:26

Bingo! Best way to reproduce is:

  1. Keep Console open in Chrome
  2. Click op "Home" (Fanoe starter kit)
  3. Click on Cache refresh and Reload in chrome


Dave Woestenborghs 30 Mar 2018, 14:00:40

So it only happens if you do point 3 ?

Dave


Arjan Woldring 30 Mar 2018, 14:02:33

point 3 ? @dawoe No, it happens while normal browsing too, but I found out that it happens more if I test it with point 3


Arjan Woldring 30 Mar 2018, 14:28:41

Tested also with your PR included in clean u7.10-sqlce-fanoe. Same problem..


Dave Woestenborghs 30 Mar 2018, 14:30:55

strange. i'm not able to reproduce it


Arjan Woldring 30 Mar 2018, 14:38:27

Hmmm...Also have a lot of these in my log:

2018-03-30 15:18:04,813 [P18568/D12/T198] WARN Umbraco.Web.Models.Mapping.PreValueDisplayResolver - Could not find persisted pre-value for field maxChars

Not sure if this has anything to do with the issue.

Gonna delete all the serverside cache and test again...


Dave Woestenborghs 30 Mar 2018, 14:42:37

There is a issue for that warning : http://issues.umbraco.org/issue/U4-10586


Arjan Woldring 30 Mar 2018, 14:48:07

@dawoe Ah ok nice.

Well, I might have good or bad news.. I deleted the complete App_data/Temp folder. And changed the clientdependencyID (not nessecary as I deleted temp-folder but better safe than sorry)

Now I can't reproduce the error anymore...but it's a fact that the error was there...which means it could happen again...


Arjan Woldring 30 Mar 2018, 14:49:39

Darn! Spoke to soon... here it is again...grrr

The problem is that it does not happen all the time. Which I hate to say...because these bugs are the toughest. The only thing is to just pay attention on what happened exactly before the error. I'll keep an eye on it.


Dave Woestenborghs 31 Mar 2018, 07:47:26

Are you able to reproduce this in 7.9.3 ? This would help narrow down where to look for the cause


Dave Woestenborghs 31 Mar 2018, 12:00:23

Good and bad news.

Good news I'm able to reproduce this. And also tracked it down The syncTree method is set in the umb-tree directive

https://github.com/umbraco/Umbraco-CMS/blob/7ee510ed386495120666a78c61497f58ff05de8f/src/Umbraco.Web.UI.Client/src/common/directives/components/tree/umbtree.directive.js#L111

So what i think what happens is that the method is called before the directive is initialized

https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web.UI.Client/src/common/services/navigation.service.js#L293

Bad news Now idea yet on how to fix this

Maybe @madsrasmussen has an idea ?


Arjan Woldring 31 Mar 2018, 12:11:03

It's indeed good news that you reproduced the error. Was there a particular situation where this error occurred? Because today I've been working for a few hours in U7.10 (your PR included) and I didn't have a single error. That's why I hate this issue, but I think you're right that this might be a 'timing' issue.


Dave Woestenborghs 31 Mar 2018, 13:15:32

I created a PR that fixes this at my side : https://github.com/umbraco/Umbraco-CMS/pull/2556

Before this I was able to reproduce this 1 time out of 10. Now i can't reproduce anymore.


Sebastiaan Janssen 09 Apr 2018, 10:16:39

This seem to need a bit more work, the js error is gone but now the tree doesn't sync any more.


Dave Woestenborghs 09 Apr 2018, 11:59:30

The tree actually never synced when this happens because of the error. The error is now suppressed.

The timeout I removed actually made the tree sync...but Shannon didn't like that :-)

Dave


Sebastiaan Janssen 09 Apr 2018, 12:53:39

Neh, the timeout is also very unreliable. We'll keep it as it is right now, it is already a lot better since the content actually loads now and no more JS errors. For a future version we can look into a proper fix (see http://issues.umbraco.org/issue/U4-11192).


Giles Olley 13 Apr 2018, 15:04:18

We're still having this problem "reliably" on refresh in 7.10.2. Anything I can check that I might be able to fix manually?


Nicholas Westby 26 Jun 2018, 22:50:58

FYI, this issue still happens on Umbraco 7.11.1 on a slow VPN connection. I've also made a note of this on the new ticket (http://issues.umbraco.org/issue/U4-11192).


Andreas Fallman 10 Aug 2018, 07:24:17

I guess that all know by now that this still doesnt work well(we "only" use 7.10.4). We use directlinks to editcontent on several places in our code in the backoffice to help editors find content and edit it (/umbraco/#/content/content/edit/id) and this always make the tree not sync. There is also another issue that isnt mentioned here and that is that the actionbutton also dissapears when doing this. It could be seen in the gif above that sebastian posted


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.8.0, 7.9.0, 7.8.1, 7.10.0, 7.9.1, 7.9.2, 7.9.3, 7.11.1

Due in version: 7.10.2, 7.9.4

Sprint:

Story Points: 1

Cycle: 9