U4-387 - Unpublished icon in tree with published node

Created by Sebastiaan Janssen 19 Aug 2012, 14:52:29 Updated by Sebastiaan Janssen 31 Jan 2013, 16:05:59

Is duplicated by: U4-331

Is duplicated by: U4-848

Relates to: U4-278

Subtask of: U4-760

Sometimes if publish a page, the tree in the node shows the unpublished icon. See attachment. I'm using Umbraco 4.7.

''Originally created on CodePlex by [jbreuer|http://www.codeplex.com/site/users/view/jbreuer]'' on 4/11/2011 3:18:24 PM [Codeplex ID: 30241 - Codeplex Votes: 5]

Imported comments

''Comment by [Przyjem|http://www.codeplex.com/site/users/view/Przyjem] on 7/28/2011 1:03:46 PM:'' I have a smilimiar problem

''Comment by [sebastiaan|http://www.codeplex.com/site/users/view/sebastiaan] on 8/9/2012 11:48:56 AM:'' We haven't been very good at maintaining the issue tracker and with 1250+ open bugs we can't be sure which ones have been fixed and when (if they are even fixed).

To keep the issue list maintainable, on Monday the 13th of August, we will be moving the issue tracker over to YouTrack (http://issues.umbraco.org) where we'll only import the issues that have been updated in the past 12 months (which means: they had comments or votes in the past year).

If you think this issue (that has had no activity in the past year) is still worth looking at then please comment and we'll look into re-opening it.

** Closed by sebastiaan 08/09/2012 2:48AM

''Comment by [jbreuer|http://www.codeplex.com/site/users/view/jbreuer] on 8/13/2012 11:10:47 AM:'' This is not fixed yet.

''Comment by [sebastiaan|http://www.codeplex.com/site/users/view/sebastiaan] on 8/15/2012 3:10:22 AM:''


3 Attachments

Download Set time sync frequency hourly.zip

Download cms.zip

Download 2690 - U4-387 - Unpublished icon in tree with published node.patch

Comments

Casey Neehouse 21 Aug 2012, 23:43:57

May be that the SQL Server date/time is not matching the system date/time. UpdateDate is set with DateTime.Now in code and cmsContentVersion.VersionDate is set by the database with a default value. Of course, load-balanced servers could result in the same issue.

Either all dates need set by the db or by the application, not both..


Sebastiaan Janssen 22 Aug 2012, 10:15:01

Seems that these issues are related, but unfortunately Casey, I can reproduce this in a small local environment (SQL CE), no datetime differences, no load balancing.


Casey Neehouse 22 Aug 2012, 15:00:36

Corrected in changeset: a248c20804ba The original code was moved from the tree to the document. When this happened, the time comparison changed from rounded seconds to milliseconds. rounded seconds > 1 = milliseconds > 1500. I changed and pushed it at 2000 milliseconds.


Sebastiaan Janssen 24 Aug 2012, 17:24:42

After having Jan test the fix, it turns out 2000ms isn't enough even.. looking at the code comment I am not sure I completely get what this is doing either (umbraco.cms.businesslogic.web.HasPendingChanges()): ///

/// Pending changes means that there have been property/data changes since the last published version. /// This is determined by the comparing the version date to the updated date. if they are different by .5 seconds, /// then this is considered a change. ///

So it's saving, then looking at the datetime in the db to see if there are more changes? I had to set it to 5 seconds for it to work properly for Jan (Windows Experience Index: 5.1, so a normal HDD, non-SSD and +/- 2 year old processor). That's probably even better than what most editors are using, so I think we need to completely rethink how we're checking this.


Casey Neehouse 24 Aug 2012, 17:30:11

Yea, Have Jan compare the db server time with the server running the site.. Bet they are out of sync by a bit. Changing the CreateNewVersion method on the content.cs to use DateTime.Now may help alleviate this issue.


Sebastiaan Janssen 24 Aug 2012, 17:33:05

He's using SQL CE, so the time can't be the issue. Also, why is this suddenly a reproducible issue? I've not seen this issue before and the code seems to have been in place for at least 2 years now..


Casey Neehouse 24 Aug 2012, 17:36:33

Definitely interesting. Any changes to the SQL Ce scripts? Tree Scripts (I know the methods used to set the styles is listed as deprecated.)


Casey Neehouse 24 Aug 2012, 17:38:28

It may be that the save is just taking that long in SQL CE. How big is the document type, and what is the lapse time from submit to response?


Emilie 29 Aug 2012, 13:32:02

I have a similar problem:

  1. When I click Publish, i get an star (unpublished) icon.
  2. If I then click Save without changing, the star icon disappears.
  3. If I then change something and only click Save, the star icon does not appear, although unpublished changes has been made.

Some icon mix-up?


Rusty Swayne 29 Aug 2012, 17:14:56

This issue can be reproduced when using SQL Server 2008 R2. I started noticing the issue in 4.8.x. Also, it seems to occur more frequently when more complex datatypes are included in the document type - DAMP, MNTP ... etc.


Emilie 03 Sep 2012, 05:55:06

Rusty's problem applies to me too. I use SQL Server 2008, and this problem always occurs on doctypes with MNTP datatypes.


Sebastiaan Janssen 06 Sep 2012, 16:16:29

Unfortunately we cannot reliably fix this before 4.9.0 is released so we're moving this to the next sprint, sorry for the delay.


Matthias Daun 07 Sep 2012, 12:30:56

had this problem in 4.8.1, but not anymore after upgrade to 4.9.0


Jeavon Leopold 14 Sep 2012, 14:33:48

I am seeing this on only sites that are upgraded to either 4.8.1 or 4.9.0. Both sites I have seen this on the DB and IIS are on the same server. SQL 2008 R2 and IIS 7.5. Anyone found a workaround yet?


Pete Duncanson 20 Sep 2012, 15:25:14

Just noticed this today running 4.9 everything appears with the unpublished star next to it. Items which are unpublished appear greyed out thankfully so can still see what is what. Reloading nodes/parent node does not flush it.


Kristoffer Eriksen 21 Sep 2012, 07:21:57

I've just installed a new 4.9 empty solution, and this happens to me to. Is there a fix for the problem, or should I create a 4.8 solution instead. It's a bit hard to explain to the customers that it is a bug and not a feature...


Kristoffer Eriksen 21 Sep 2012, 08:10:21

Now the problem don't exist on a different computer, and after a complete IIS reset and configuration, it now works...


Mark van Schaik 24 Sep 2012, 03:01:38

occurs on both 4.8 upgraded to 4.9 and another new 4.9 install. localhost and production server. database - SQL SERVER 10.50.2500


Emilie 25 Sep 2012, 06:58:32

My problem was I had the database on another server, while working locally. I recently moved the site to the same server as the database, and the icons are now behaving as they should.

Before 4.9, though, I never had any of these problems while working locally.


Stefan Kip 26 Sep 2012, 09:32:39

We're experiencing this issue too, 4.9.0


Richard Soeteman 28 Sep 2012, 12:50:41

Same here 4.9


John Murphy 28 Sep 2012, 19:39:19

This is happening to me on a fresh 4.9 install with a MySql backend.


Chriztian Steinmeier 01 Oct 2012, 10:08:09

This just occurred on a 4.9.0 (DB is MySQL) for me - the solution has been running for a couple of weeks without this, but today I used the Publish option in the context menu for the first time (checking both checkboxes) and got the icon overlay on the node+descendants. All subsequent "Save and Publish" actions now result in icons being overlaid on the published node + its descendants...


Stefan Kip 01 Oct 2012, 10:11:14

As a fix we've set the time sync interval to every hour on our servers via a registry file.


Pete Duncanson 03 Oct 2012, 10:24:16

@Stefan, how does your script work? What is it doing to fix the issue?

I've got clients asking arkward questions about this one, making us look a little silly. Is there not a patch we could have?


Stefan Kip 03 Oct 2012, 10:29:28

@Pete, it changes the Windows time sync interval from once a week to every hour. This helps to keep the time between the SQL server and the Web server in sync.

There's no patch available yet. However Niels mentioned on Twitter a fix will be included in v4.10.0 which will be released next Friday: https://twitter.com/umbraco/statuses/253424878986866688


Niels Hartvig 03 Oct 2012, 12:19:02

I've fixed it (thanks to the awesome debugging info from Kraftvaerk.net and comments in this thread - h5yr!)

I'll push it one of the coming days as it's a part of a bigger changeset with the doctype enhancements which I'll need to merge with 4.10!


Niels Hartvig 03 Oct 2012, 12:25:44

For those interested: The issue was caused by two things:

  1. That when a new version of a document was generated one of the dates is set in the businesslayer (.NET) and the other date was set by the DB via a default value in the table definition. I've moved the responsibility solely to the businesslayer.
  2. That the dates was set two places in the businesslayer independently, which meant that if you had many property types or a datatype with (very) intensive processing (or a crappy server / heavily shared host ;-)) there would be enough of a time diff to cause the overlay to be set (500 ms was the tolerance - I've increased that to 2000).

In the fix, the date is stored in a local variable and then passed to the helper method that generates the new version, ensuring that there's no (0 ms) time difference between the version date and the initial update date when a new version of a doc is created. The reason to increase the overlay tolerance time to 2000 ms is to help with those versions / installations already affected.


Chriztian Steinmeier 09 Oct 2012, 06:55:00

This problem just went away completely on my installation - does that imply that someone republished everything on a "good day", server performance wise?


Sebastiaan Janssen 15 Oct 2012, 09:27:24

If you're running on 4.9.0 without any core modifications, this updated cms.dll should help with your icon problems. This fix is of course included in 4.10.0.

If anybody wants to inspect the code changes, attached is also a patch file which you can ignore if you're not interested in the underlying code.


Zac 19 Oct 2012, 20:58:33

I'm encountering this bug on v4.9 too. I just uploaded the new cms file from Sebastiaan's comment above and it still isn't resolving the issue.


Carl Schéle 22 Oct 2012, 14:30:55

Brilliant, thanks for fixing this. I just replaced the .dll and it works great!


Steve Larsen 13 Nov 2012, 20:10:24

Sebastiaan, we are on 4.7 and cannot upgrade at the moment, is there a way for us to bump the overlay tolerance to 2000ms as you suggest? We're seeing differences of about 6-700 ms so this might work for us.


Sebastiaan Janssen 19 Nov 2012, 10:51:51

@Steve look at the patch file, it shows you the differences in the code from which you should be able to do a custom 4.7 build. Unfortunately we can't provide custom builds for each version of Umbraco that would eat up all of our precious time.


Steve Larsen 19 Nov 2012, 16:53:01

Thank you Sebastiaan, I did not expect you to provide a custom build, I was hoping you knew of a config setting or similar. I am looking into upgrading to 4.10 and I am going to pull down the source for future reference. Thank you for your work!


Sebastiaan Janssen 19 Nov 2012, 17:05:48

@Steve Nope, unfortunately the only way to solve this is by updating the code.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category: UI

Backwards Compatible: True

Fix Submitted:

Affected versions: 4.10.0

Due in version: 4.9.1

Sprint:

Story Points:

Cycle: