wagtail-transfer icon indicating copy to clipboard operation
wagtail-transfer copied to clipboard

Ordering of imported child pages is not stable when compared to source site

Open stevejalim opened this issue 4 years ago • 0 comments

When a sub-tree - eg a parent page with more than one child - is imported, W-T cannot currently guarantee the explicit ordering of the child pages will be reflected in the destination site.

Example:

  • Existing parent page X on both source and destination sites, with existing children of mixed page types (A and B)
  • Added two child pages (of different types) (A2 and B4) to source site
  • Import parent page X
  • A2 and B4 are transferred
  • The ordering of the children was not the same as on the source site:
    • source: A1..... A2, B4
    • dest: A1..... B4, A4

I get that the order pages are created in at the destination side is determined by a dependency graph, so something with/without an image may get done before/after a page that doesn't have the same criteria. (I haven't yet looked at what the logic/rules are).

However, this situation means that one can't reliably import a sub-tree while preserving the ordering, which may then result in menus/listings/archives having items in a different/wrong order, if they are using explicit ordering.

(Equally, though a separate topic, ordering by date of creation/update isn't viable either, because that date is overwritten by auto_now_add)

stevejalim avatar Nov 18 '20 12:11 stevejalim