Opened 4 years ago

Closed 21 months ago

#8444 closed defect (bug) (fixed)

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

Reported by: Otto42 Owned by:
Priority: low Milestone: 2.8
Component: Quick/Bulk Edit Version: 2.7
Severity: normal Keywords: has-patch
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 4 years ago.
fixed typo
8444.discover-level.2.diff (719 bytes) - added by jbsil 4 years ago.
accounts for actual orphans
8444.2.patch (584 bytes) - added by SergeyBiryukov 23 months ago.
8444.3.patch (1.7 KB) - added by SergeyBiryukov 23 months ago.

Download all attachments as: .zip

Change History (17)

  • Milestone set to 2.7.1

comment:2   ryan4 years ago

  • Component changed from UI to Quick Edit
  • Milestone changed from 2.7.1 to 2.8
  • 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.

jbsil4 years ago

fixed typo

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

jbsil4 years ago

accounts for actual orphans

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

  • 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

  • Resolution fixed deleted
  • Status changed from closed to reopened

Broken in [15500]. Attaching the patch.

  • 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.

  • Keywords has-patch added; needs-patch removed

8444.3.patch passes along the hierarchical_display parameter.

  • Keywords needs-testing added
  • 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.