[wp-trac] [WordPress Trac] #44914: Bulk Edit posts changes Post format back to Standard

WordPress Trac noreply at wordpress.org
Sat Sep 8 08:55:28 UTC 2018


#44914: Bulk Edit posts changes Post format back to Standard
-------------------------------------------------+-------------------------
 Reporter:  lanche86                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Post Formats                         |     Version:  4.9
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots has-patch needs-     |     Focuses:
  testing has-unit-tests                         |  administration
-------------------------------------------------+-------------------------
Changes (by birgire):

 * keywords:  has-screenshots has-patch needs-testing => has-screenshots
     has-patch needs-testing has-unit-tests
 * version:  4.9.8 => 4.9


Comment:

 Related ticket #41396

 @mukesh27 that looks good

 The patch in [attachment:"44914.diff"] adjusts [attachment:"44914.patch"]
 by using a single unset.

 It also adds a unit test.

 We note that {{{get_post_format()}}} removes the post format prefix
 {{{'post-format-'}}} before returning the post format slug.

 It's not enough to assert only with {{{get_post_format()}}} if the post
 format was preserved in bulk post editing,

 as the bug here removes the post format prefix from the post format slug.

 Example: The {{{'post-format-image'}}} is changed and saved to
 {{{'image'}}}.

 So we need to explicitly check the post format slug.

 Here we tested 3 posts;
 - the first one with ''Image'' post format,
 - the second one with ''Aside'' post format,
 - the third one with ''Standard'' post format (means it's not set).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44914#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list