[wp-trac] [WordPress Trac] #25416: "Preview Changes" throws a PHP Notice and Warning every second use

WordPress Trac noreply at wordpress.org
Wed Sep 25 13:16:08 UTC 2013


#25416: "Preview Changes" throws a PHP Notice and Warning every second use
-------------------------------+------------------------------
 Reporter:  crysman            |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Autosave           |     Version:  3.6.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => reporter-feedback
 * component:  General => Autosave


Comment:

 Could not reproduce on a clean install.

 The error is coming from `wp_create_post_autosave()` ([source:tags/3.6.1
 /wp-admin/includes/post.php#L1333]), however `$new_autosave` does contain
 the `post_excerpt` field:
 {{{
 Array
 (
     [post_title] => test
     [post_content] => 1 2
     [post_excerpt] =>
     [post_parent] => 6654
     [post_status] => inherit
     [post_type] => revision
     [post_name] => 6654-autosave-v1
     [post_date] =>
     [post_date_gmt] =>
     [ID] => 6656
     [post_author] => 1
 )
 }}}
 As far as I can see, this can only happen if a plugin hooked to
 `_wp_post_revision_fields` filter ([source:tags/3.6.1/wp-
 includes/revision.php#L9]) removes `post_excerpt` from the default fields.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25416#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list