Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14194 closed defect (bug) (fixed)

quick-edit works only once for a hierarchical custom post type

Reported by: ziegenberg Owned by:
Milestone: 3.0.1 Priority: normal
Severity: normal Version: 3.0
Component: Quick/Bulk Edit Keywords: has-patch
Focuses: Cc:


If you create a custom post type and make it hierarchical the quick-edit works only once. After the ajax-request (saving) is finished the link does effectively nothing. This does not bother non-hierarchical custom post types.

Steps to reproduce:

  • Create a custom post type.
  • Create a new post of that new custom post type.
  • In the left sidebar menu click the overview of the post type -> the list with all posts shows up.
  • Click "Quick Edit"
  • Click "Save" to save the post.
  • Click "Quick Edit" again -> nothing happens.

Attachments (1)

14194.diff (873 bytes) - added by nacin 8 years ago.

Download all attachments as: .zip

Change History (7)

#1 @nacin
8 years ago

  • Milestone changed from Awaiting Review to 3.0.1

Per IRC discussion. ziegenberg identified that in admin-ajax, inline-save action, all post types except 'page' are directed to post_rows. Looks like hierarchical post types should be directed through page_rows. Fixes another similar bug reported by ziegenberg as well.

8 years ago

#2 @ziegenberg
8 years ago

  • Keywords 2nd-opinion dev-feedback close added

I tested the patch and found no drawbacks. Bug fixed.

  • normal posts (~non-hierarchica) and normal pages (~hierarchical) still work.
  • hierarchical and non-hierarchical custom post types now also work as ecxpected.

Nice work!

#3 @nacin
8 years ago

  • Keywords has-patch added; 2nd-opinion dev-feedback close removed
  • Version set to 3.0

#4 @nacin
8 years ago

Patch also converts the check to show_ui instead of public. I just did a quick audit and found another case where we should s/public/show_ui/ -- line 24, edit-tags.php. We also use public instead of show_ui in a few places in upload.php but I wonder if that is preferred.

#5 @nacin
8 years ago

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

(In [15373]) Use page_rows() for quick edit for all hierarchical post types. fixes #14194 for trunk

#6 @nacin
8 years ago

[15372] for trunk, [15373] for 3.0.

Note: See TracTickets for help on using tickets.