Make WordPress Core

Opened 7 years ago

Closed 2 years ago

Last modified 2 years ago

#42474 closed defect (bug) (fixed)

bulk_edit_posts should honor the show_in_quick_edit property of taxonomies

Reported by: chouby's profile Chouby Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Quick/Bulk Edit Keywords: commit add-to-field-guide
Focuses: performance Cc:

Description

When bulk editing posts, several database queries are related to taxonomies for which show_in_quick_edit is set to false. Since the terms are not modified, these queries uselessly harm the performance.

This is because bulk_edit_posts does not check this property when building arguments to pass to wp_update_post.

Attachments (3)

42474.diff (1.5 KB) - added by Chouby 7 years ago.
42474.1.diff (1.6 KB) - added by sabernhardt 4 years ago.
simple refresh
42474.2.diff (1.6 KB) - added by costdev 3 years ago.
Patch refreshed against trunk.

Download all attachments as: .zip

Change History (13)

@Chouby
7 years ago

#1 @Chouby
7 years ago

  • Keywords has-patch added

@sabernhardt
4 years ago

simple refresh

#2 @sabernhardt
4 years ago

  • Keywords needs-testing added
  • Version 4.2 deleted

@Chouby Your approach looks good. I refreshed the patch to work with the current file.

This ticket was mentioned in Slack in #core by abhanonstopnews. View the logs.


3 years ago

@costdev
3 years ago

Patch refreshed against trunk.

#4 @webcommsat
3 years ago

Adding summary from @nalininonstopnewsuk as she is unable to add changes to the ticket.

  • This has a patch and appears just to need testing. Request to promote it at devchat on 16 March 2022.
  • Any additional updates requested to @sabernhardt to try and get this into a future release, and to @chouby if there was any update for the ticket

Nalini:speech_balloon: 20:52
If this is still live, could it be added to open floor for dev chat this week to get some testing of the patch to move it forward @marybaum? (edited

#5 @marybaum
3 years ago

Pending testing from @meher. Slack was down for a lot of India last week, wo presumably she'll catch up in due course.

This ticket was mentioned in Slack in #core by abhanonstopnews. View the logs.


3 years ago

#7 @marybaum
3 years ago

  • Keywords commit added; has-patch needs-testing removed

In a scrub of the component, @webcommsat, @arslan and I tested the latest .diff from @costdev, and it works. Recommend commit!

#8 @sabernhardt
2 years ago

  • Milestone changed from Awaiting Review to 6.1

#9 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 53449:

Quick/Bulk Edit: Check the show_in_quick_edit taxonomy property when processing the data for bulk edited posts.

Previously, setting the show_in_quick_edit property to false removed the taxonomy from the inline edit form, but several taxonomy-related database queries were still being performed in bulk_edit_posts() when building the arguments to pass to wp_update_post(), even though terms were not modified.

This commit improves performance by avoiding unnecessary database queries when show_in_quick_edit is false, and mirrors a similar check in the get_inline_data() function.

Follow-up to [13535], [14580], [31307], [52841], [53368].

Props Chouby, sabernhardt, costdev, nalininonstopnewsuk, webcommsat, marybaum, meher, wparslan, SergeyBiryukov.
Fixes #42474.

#10 @milana_cap
2 years ago

  • Keywords add-to-field-guide added
Note: See TracTickets for help on using tickets.