Posts moved to trash randomly and duplicate posts

Topics: Business Logic Layer
Apr 3, 2014 at 2:59 PM
We have multiple clients running various versions of BE, but we have a strange issue with one client who is on BE with a SQL 2008 back end. Seemingly randomly, blocks of published live posts will be moved to the trash. This same client will see duplicate posts created while they are editing the posts (clicking Save several times along the way to save their work). We have been able to replicate the duplicate post issue only once in our development environment (same BE and SQL), but only using a Mac and Safari, never on a PC.

Not sure if the two items are linked or not. Like I mentioned, we have multiple clients running BE, but have never seen any issues like this. Any insight on either topic is greatly appreciated...

~ Scott
Apr 3, 2014 at 6:12 PM
In 2.8, there is a javascript function triggered by timer every 15 seconds or so to auto-save post into session. Could be Safari has problem with it. You probably should turn auto-safe off to prevent this from happening for this specific install. You can comment it out in code, somewhere in blog.js I believe.
Apr 3, 2014 at 6:21 PM
Thanks for the thought on the duplicates. We will give that a try and see if it alleviates the problem. Any thoughts on the mass deleted (changing IsDeleted to 1) posts? We're going to add a trigger to the table to record the time of deletion to see if it coincides with an UI activity (e.g. an author deleting a single post) or if it's something automated.

Thanks again,

Apr 11, 2014 at 12:28 PM
Edited Apr 16, 2014 at 2:06 PM
I'm on 2.8 and I switch between Firefox and Chrome when testing my site and have experienced the duplicate posts behavior. Can't remember which one but at least we know it's not just Safari.

What I did notice was that the duplicates seem to occur only during the creation of a Post when you click on Save while on the Edit Post page, make some edits and then click on Save again without leaving the Edit Post page.

I hope this helps. Thanks!

Apr 15, 2014 at 7:31 PM
Commenting out the auto save did not stop the duplicate or deleted post issue. In fact we've had another author replicate the duplicate post issue in IE 8 on XP (yeah, I know... we're working with her IT dept to get her upgraded to Chrome or something else). The Mac user however is running OS X 10.7.5 (not too terribly old) and has had the duplicate and the deleted post issue in Chrome and FireFox.

We wrote an extension to log whenever a post is saved or deleted (and put an auto recover in place to keep Published posts from being deleted). It looks like the random deletes happen 1 to 2 seconds apart. Because they are triggering the Post.Saved event and we are able to capture the identity of the logged it user, it does appear the deletes are originating through the UI. This is truly baffling b/c we have no other clients with this issue.

Any other suggestions on the stopping or even troubleshooting the duplicates or deletes is appreciated.


May 6, 2015 at 3:59 PM
Anyone have an update regarding the duplicates? I'm running an older version of BE (1.6.1) and I'm seeing duplicates. The Posts table do not contain duplicates so when I call Post.Reload or recycle the app pool they are cleared out but this is only a band aid fix.