[wp-trac] [WordPress Trac] #39917: AutoSave is not disabling in spite of settings added in wp-config.php
WordPress Trac
noreply at wordpress.org
Mon Feb 20 14:42:00 UTC 2017
#39917: AutoSave is not disabling in spite of settings added in wp-config.php
-------------------------------+------------------------------
Reporter: subrataemfluence | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Autosave | Version: 4.7.2
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: administration
-------------------------------+------------------------------
Changes (by subrataemfluence):
* focuses: => administration
Comment:
Thank you. I did a few tests with `auto-draft` feature to understand what
it exactly does.
1. Removed the following block from `wp-config.php`
{{{
define( 'AUTOSAVE_INTERVAL', 20000000000 ); // autosave 1x per year
define( 'EMPTY_TRASH_DAYS', 0 ); // zero days
define( 'WP_POST_REVISIONS', false ); // no revisions
}}}
2. Started creating a new post by adding a title. Draft auto-saved.
3. Added a few lines in content editor, draft again auto saved
4. Selected a native category taxonomy. Draft auto saved again and added a
row in `wp_term_relationships` table for correct `object_id`
5. Added a featured image - Auto Save did not add entries in `wp_posts` or
`wp_postmeta`
6. Selected a custom taxonomy I created for this post type. This did not
get auto-saved with the post and no new row was added in
`wp_term_relationships` table.
7. Added information in custom meta boxes. They did not get auto-saved
either.
Observation:
1. Setting in `wp-config.php` does have some effect in preventing auto-
drafting (auto-saving) partially. If I keep that on, only title and
content gets auto saved and only once
2. If the setting is not present, auto save occurs in a certain interval
and saves title, content and native category taxonomy but not anything
custom including featured image.
3. Without the setting, auto save also works in edit mode but not when the
setting is added.
4. Without settings, auto save works on native category taxonomy but only
when either title or the content is modified
5. Closed the browser and opened the post back in edit mode this time.
Only saved information are Title, Content and Category, no meta
information or featured image. Means WordPress does not auto-save anything
except post-type's native fields.
My understanding:
So what you have said is partially right - "there's no way to disable that
functionality - it's core functionality...", but `wp-config.php` with and
without settings applied do have impacts on auto-draft / auto-save
functionality. Although so far we do not have the ability to completely
disable the feature we can put some breaks on it!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39917#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list