Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent "Auto Draft" posts from being logged #293

Closed
frankiejarrett opened this issue Mar 3, 2014 · 7 comments · Fixed by #316
Closed

Prevent "Auto Draft" posts from being logged #293

frankiejarrett opened this issue Mar 3, 2014 · 7 comments · Fixed by #316
Labels

Comments

@frankiejarrett
Copy link
Contributor

@wormeyman reported in the support forum that "Auto Draft" records are being created randomly by the server, I have confirmed this is occurring in my testing environment also.

screen shot 2014-03-03 at 4 18 06 pm

I don't think Stream should be tracking these since they are not actually from a user action, but rather, a system action which deletes neglected drafts. All post types are affected by this.

@shadyvb Do you agree?

I'm not 100% what the steps are to recreate this, but I think you might be able to by creating a new post, leaving it up for a minute and then abandon the screen without doing anything.

@shadyvb
Copy link
Contributor

shadyvb commented Mar 3, 2014

Yes, actually i was being bugged by this every now and then, and was going to report it today! We should definitely kill it, totally useless to track it.

EDIT: There almost no need to recreate the issue, it should be fairly easy to fix it in the Posts Connector.

@wormeyman
Copy link

auto draft
I can confirm that my screen looks similar to yours! I also have no idea how to create this.

edit: Also this website has 0 posts it is an all page website not a blog.

@shadyvb
Copy link
Contributor

shadyvb commented Mar 3, 2014

@wormeyman Auto Draft here would reference any type of content, posts or pages or any custom post type as well.

And this probably is carried out by a cron or something, since it happens on logging to the administration area sometimes without triggering any action related to editing content.

@wormeyman
Copy link

It looks like it may be related to post revisions after doing a little Google searching.

@shadyvb
Copy link
Contributor

shadyvb commented Mar 3, 2014

Post revisions are handled already in another part of the connector, they probably aren't the reason behind this.

@powelski
Copy link

powelski commented Mar 9, 2014

I did some research. It seems that the easiest way to create auto drafts is going to Add new post page and clicking Save draft when there's no content at all.

Prevention of deletion logging is not possible by post status, because all trashed posts have trash status. I found out that there's one thing that is special for auto drafts: at the same time they do have titles and don't have post slugs (post_name). After my research it seems like it's their uniqueue property.

@powelski
Copy link

powelski commented Mar 9, 2014

After longer research it seems that this combination occurs for regular drafts with non-empty title as well. I found something else: auto drafts are the only ones with post_modified_gmt field set to 0000-00-00 00:00:00. All other types have it set to current date even if their post_date_gmt is 0000-00-00 00:00:00!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants