I am using JQuery to hide: add media stuff. Just only a unique ID entry is created in posts table (and not a bunch of useless Auto Draft entries related) and media stuff will be visible after user manually saves current post.

Rare behavior:
When a user logins for the first time and is redirected to Dashboard, WP creates an Auto Draft entry in posts table, hmmm, crazy! Somebody knows why it works like that?

A better solution: perhaps not altering at any chance core files? It will be a great one! For example, with a checkbox in Settings to check or uncheck if we want the "autosave" feature or not (get_option). Somebody else wants to apply the patch?

2 Answers
2

Auto-drafts exist because of the fact that multiple users can create
new posts at the same time. If two people enter post-new at roughly
the same moment, then have their first autosaves occur nearly
simultaneously, then there is a race condition that can cause one of
them to get back the wrong post ID, which will cause a post to be
overwritten/lost when they then continue editing the post.

The auto-draft creates the post and gets the ID of the new post before
the editing screen is displayed, thus preventing two simultaneous
authors from accidentally having the same post ID in the data in their
browser.

I thought MySQL can handle that, but is nice to learn about it from WP point of view. Cool to know about self-cleaning. Well Im going to do something useful as sleep a couple of hours. Thanks. But I still think a lot of IDs in post table is a kind of nasty solution, maybe Im 100% wrong :)
–
José Pablo Orozco MarínMar 4 '12 at 6:29

Thanks for sharing this hack (it works!). I wish someone could make a plugin for it or WordPress would provides users option to disable.

Actually, every time I visit Dashboard home (while logged in, of course), an Auto Draft is created after 60 (?) seconds. Not 'rare' occurrence. Default WordPress behavior. Happens each time I visit Dashboard (NOT just after initial login redirect). I use a plugin that redirects me to another page (that I choose) after I login to WP - instead of being redirected to Dashboard. But this still means I can only view my Dashboard for less than 60 (?) seconds otherwise an Auto Draft will be created. Dumb Wordpress behaviour - wish there was a real solution.