wagtail/docs/releases
Andy Chosak 349fca66f3 Fix: Properly save ordering of nested InlinePanels
The order of nested InlinePanels (recently formally added in 5566)
doesn't get saved properly due to some now-invalid assumptions in the JS
selector code.

Currently, Wagtail users can use the editor up/down arrows to order
InlinePanel elements that contain child InlinePanels, but these may not
be properly saved.

Before InlinePanel nesting was supported, it was a safer bet that a
child panel would only contain one hidden input named "-ORDER". With
nesting, however, a parent panel will also contain hidden inputs named
like this for its child panels. This breaks the logic used in the
ordering code.

This change modifies the logic to use the jQuery `.children()` selector
instead of `.next()`, ensuring that we reference the correct adjacent
panel item.

An easy way to test this against current master is to use the Wagtail
testapp test models that exercise this behavior:

1. `wagtail start testwagtail` to create a new project.
2. `cd testwagtail`
3. Edit testwagtail/settings/base.py to add the Wagtail test
application `'wagtail.tests.testapp'` to the list of `INSTALLED_APPS`.
For the admin to work properly with this app, you also need to add
`'wagtail.contrib.settings'` to that list and copy the definition of
`WAGTAILADMIN_RICH_TEXT_EDITORS` from wagtail/tests/settings.py.
4. `./manage.py migrate` to create your local database.
5. `./manage.py createsuperuser` to create an admin user.
6. Create a new Event Page
(http://localhost:8000/admin/pages/add/tests/eventpage/3/).
7. Fill in all required items, and then add multiple speakers under
"Speaker Lineup". For each speaker, add at least one Award. Save the
page.
8. Try using the up/down arrows to reorder the speakers (the parent
InlinePanel), and save the page.
9. Note that when the page reloads, the ordering hasn't been saved. If
you debug using the developer tools, you'll notice that this is because
the code being modified here selects the child panel items instead of
the adjacent parent panel item.
2020-01-15 16:43:32 +00:00
..
0.4.1.rst add release notes / changelog entry for 0.4.1 2014-07-14 13:12:04 +01:00
0.4.rst Fix capitalisation of names 2018-04-05 12:13:05 +01:00
0.5.rst Use .. code-block:: console for all shell commands 2016-11-28 13:41:35 +00:00
0.6.rst Fix whitespace errors in docs 2016-11-28 13:41:35 +00:00
0.7.rst Fix capitalisation of QuerySet 2018-04-05 12:13:05 +01:00
0.8.1.rst Prepare for 0.8.1 release 2014-11-05 22:05:48 +00:00
0.8.3.rst Fix spelling mistakes in documentation 2018-04-05 12:13:05 +01:00
0.8.4.rst release note for #872 2014-12-16 16:43:55 +00:00
0.8.5.rst Started fixing spellings. Added wordlist 2015-04-17 23:05:08 +01:00
0.8.6.rst Use .. code-block:: console for all shell commands 2016-11-28 13:41:35 +00:00
0.8.7.rst Finalise 0.8.7 in documentation 2015-04-29 14:08:32 +01:00
0.8.8.rst remove 'in development' from 0.8.8 2015-06-18 16:38:21 +01:00
0.8.10.rst version bump to 0.8.10 due to packaging issues (grr) 2015-09-16 17:36:21 +01:00
0.8.rst Mark 0.8, 1.4, 1.8 and 1.12 as LTS releases in release notes 2017-07-04 15:20:44 +01:00
1.0.rst updated Django Docs Links to point to *docs.djangoproject.com/en/stable/* 2018-05-18 14:43:42 +01:00
1.1.rst Fix capitalisation of QuerySet 2018-04-05 12:13:05 +01:00
1.2.rst Reword 1.2 release note 2018-04-05 12:13:05 +01:00
1.3.1.rst Version bump to 1.3.1 2016-01-05 17:19:08 +00:00
1.3.rst Rename wagtail.wagtailcore to wagtail.core 2017-11-26 22:43:47 +00:00
1.4.1.rst Removed arrow-up after selector issue #2365 2016-03-17 01:25:26 +00:00
1.4.2.rst Tweaks to changelog message 2016-03-30 22:29:33 +01:00
1.4.3.rst 1.4.3 no longer in development 2016-04-04 21:39:58 +01:00
1.4.4.rst Update release notes / contributors with new translations imported into 1.4.4 2016-05-10 11:28:46 +01:00
1.4.5.rst 1.4.5 is now released 2016-05-19 15:00:35 +01:00
1.4.6.rst Add release notes for 1.4.6 2016-07-18 19:14:28 +01:00
1.4.rst Fix 'email notifications' link 2018-02-14 14:06:21 +00:00
1.5.1.rst mark 1.5.1 as no longer in development 2016-06-07 18:59:13 +01:00
1.5.2.rst Release note for 1.5.2 2016-06-08 11:52:27 +01:00
1.5.3.rst Add release notes for 1.5.3 2016-07-18 19:15:27 +01:00
1.5.rst Add documentation to help with customisation of contrib.modeladmin 2016-09-28 20:52:19 +01:00
1.6.1.rst updated Django Docs Links to point to *docs.djangoproject.com/en/stable/* 2018-05-18 14:43:42 +01:00
1.6.2.rst Release notes for #2966 2016-09-01 17:02:55 +03:00
1.6.3.rst Release note for #3017 2016-09-30 10:06:44 +01:00
1.6.rst Disable client-side validation on Django 1.10 for multipart forms 2016-08-15 18:36:11 +01:00
1.7.rst Use .. code-block:: for all python, html blocks 2016-11-28 13:41:34 +00:00
1.8.1.rst remove 'IN DEVELOPMENT' text from 1.8.1 2017-01-26 16:18:31 +00:00
1.8.2.rst Release note for #3252 backport to 1.8.x 2017-04-21 15:15:22 +01:00
1.8.rst Fix capitalisation of QuerySet 2018-04-05 12:13:05 +01:00
1.9.1.rst Release note for #3252 backport to 1.9.x 2017-04-21 15:15:23 +01:00
1.9.rst Set release date for 1.9 2017-02-16 10:47:34 +00:00
1.10.1.rst Release note for #3603 2017-05-19 12:54:15 +01:00
1.10.rst updated Django Docs Links to point to *docs.djangoproject.com/en/stable/* 2018-05-18 14:43:42 +01:00
1.11.1.rst fill in release date for 1.11.1 2017-07-07 14:40:16 +01:00
1.11.rst Rename wagtail.wagtailcore to wagtail.core 2017-11-26 22:43:47 +00:00
1.12.1.rst fill in release date for 1.12.1 2017-08-30 17:24:04 +01:00
1.12.2.rst Fill in release date for 1.12.2 2017-09-18 21:44:48 +01:00
1.12.3.rst Fix capitalisation of QuerySet 2018-04-05 12:13:05 +01:00
1.12.4.rst Fill in release date for 1.12.4 2018-07-04 15:36:07 +01:00
1.12.5.rst Add release notes for 1.12.5 2018-08-13 12:37:47 +01:00
1.12.6.rst Add release notes for 1.12.4 - 1.12.6 and 1.13.2 - 1.13.4 2018-08-13 15:12:37 +01:00
1.12.rst Update LTS imformation 2018-03-29 14:30:27 +02:00
1.13.1.rst Fix capitalisation of QuerySet 2018-04-05 12:13:05 +01:00
1.13.2.rst Fill in release date for 1.13.2 2018-07-04 15:36:08 +01:00
1.13.3.rst Add release notes for 1.13.3 2018-08-13 12:37:47 +01:00
1.13.4.rst Add release notes for 1.12.4 - 1.12.6 and 1.13.2 - 1.13.4 2018-08-13 15:12:37 +01:00
1.13.rst Update LTS imformation 2018-03-29 14:30:27 +02:00
2.0.1.rst Fill in release date for 2.0.1 2018-04-04 14:59:52 +01:00
2.0.2.rst Add release notes for 2.0.2 2018-08-13 15:12:47 +01:00
2.0.rst updated Django Docs Links to point to *docs.djangoproject.com/en/stable/* 2018-05-18 14:43:42 +01:00
2.1.1.rst Fill in release date for 2.1.1 2018-07-04 15:36:49 +01:00
2.1.2.rst Release notes for 2.1.2 2018-08-06 13:11:11 +01:00
2.1.3.rst Add release notes for 2.1.3 2018-08-13 15:13:05 +01:00
2.1.rst replace my name with my name 2018-07-10 11:20:28 +01:00
2.2.1.rst Release note for #4730 2018-08-13 16:31:56 +01:00
2.2.2.rst Fill in release date for 2.2.2 2018-08-29 14:15:44 +01:00
2.2.rst Fill in release date for 2.2 2018-08-10 12:17:19 +01:00
2.3.rst Fill in release date for 2.3 2018-10-23 15:39:56 +01:00
2.4.rst Document the workaround for broken wagtailimages.Filter references in custom image migrations 2019-07-03 12:10:04 +01:00
2.5.1.rst Add release notes page for 2.5.1 2019-05-07 18:22:37 +01:00
2.5.2.rst Fill in release date for 2.5.2 2019-08-01 10:46:33 +01:00
2.5.rst Fill in release date for 2.5 2019-04-24 16:21:43 +01:00
2.6.1.rst Fill in release date for 2.6.1 2019-08-05 15:18:38 +01:00
2.6.2.rst Fill in release date for 2.6.2 2019-09-19 15:05:20 +01:00
2.6.3.rst Release note for #5643 in 2.6.3 2019-10-22 16:14:17 +01:00
2.6.rst Fill in release date for 2.6 2019-08-01 10:47:07 +01:00
2.7.1.rst Fill in release date for 2.7.1 2020-01-08 10:39:45 +00:00
2.7.rst Move edit locking upgrade considerations note to 2.8 2020-01-08 15:20:25 +00:00
2.8.rst Fix: Properly save ordering of nested InlinePanels 2020-01-15 16:43:32 +00:00
index.rst Release notes for #5694 2020-01-07 17:03:09 +00:00
upgrading.rst Make Django 3.0 support official 2019-12-17 14:24:31 +00:00