Make WordPress Core

Opened 15 years ago

Closed 12 years ago

#8444 closed defect (bug) (fixed)

Quick Editing a Child Page makes it appear to not be a child any more

Reported by: otto42's profile Otto42 Owned by:
Milestone: 2.8 Priority: low
Severity: normal Version: 2.7
Component: Quick/Bulk Edit Keywords: has-patch
Focuses: Cc:

Description

Latest Trunk.

To reproduce: Go tot he pages screen and Quick Edit any child Page. Upon Saving, the page will appear to be all the way on the left, not indented like all the other child pages.

This is a mere visual/javascript error, the page is still a child properly, as reloading the Pages screen will show.

Attachments (4)

8444.discover-level.diff (686 bytes) - added by jbsil 15 years ago.
fixed typo
8444.discover-level.2.diff (719 bytes) - added by jbsil 15 years ago.
accounts for actual orphans
8444.2.patch (584 bytes) - added by SergeyBiryukov 12 years ago.
8444.3.patch (1.7 KB) - added by SergeyBiryukov 12 years ago.

Download all attachments as: .zip

Change History (17)

#1 @thee17
15 years ago

  • Milestone set to 2.7.1

#2 @ryan
15 years ago

  • Component changed from UI to Quick Edit
  • Milestone changed from 2.7.1 to 2.8

#4 @jbsil
15 years ago

  • Keywords has-patch needs-testing added

The immediate problem here was that the AJAX call only includes a single page, and if that page is a child, its parent is not included, so the function assumes it is an orphan and provides level 0.

This patch rechecks the level if ($level == 0 && (int)$page->post_parent > 0)
When the correct level is determined, the returned row includes the correct number of dashes so the post remains/becomes/is no longer indented accordingly.

This does bring up another related but much larger issue of not reordering pages after they are quick-edited to be children of a different page. The issue here is two fold: first, the page, now being (or no longer being) a child of another page, is almost guaranteed to be in the 'wrong' place in the list of pages. This cannot be solved easily, as any change to the list or paged view will result in a jarring user experience, likely seen as a bug. The second issue is that any children of the page that was just edited should likely also be relocated and/or have the number of dashes in their title changed.

This patch does not address either issue, and I believe both issues are out of scope for this milestone, as discussed with azaozz in email correspondence. A refresh of the page (or navigation to a different paginated view, etc.) will display the relocated pages correctly.

@jbsil
15 years ago

fixed typo

#5 @jbsil
15 years ago

NB: I have not tested this page against an ACTUAL orphan. That should probably be done to make sure things still work as expected.

@jbsil
15 years ago

accounts for actual orphans

#6 @jbsil
15 years ago

2nd patch accounts for actual orphans (which are challenging to create).

#7 @azaozz
15 years ago

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

(In [10968]) Fix listing of child pages after editing with Quick Edit, props jbsil, fixes #8444

#8 @Ipstenu
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#9 @SergeyBiryukov
12 years ago

Broken in [15500]. Attaching the patch.

#10 @SergeyBiryukov
12 years ago

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

8444.2.patch erroneously applies hierarchical display when ordering by other columns.

Trying to figure out the other options.

#11 @SergeyBiryukov
12 years ago

  • Keywords has-patch added; needs-patch removed

8444.3.patch passes along the hierarchical_display parameter.

#12 @SergeyBiryukov
12 years ago

  • Keywords needs-testing added

#13 @SergeyBiryukov
12 years ago

  • Keywords needs-testing removed
  • Resolution set to fixed
  • Status changed from reopened to closed

Re-closing as fixed for 2.8. Opened #18615 for 3.1.

Note: See TracTickets for help on using tickets.