# Wagtail 6.4 release notes - IN DEVELOPMENT

_Unreleased_

```{contents}
---
local:
depth: 1
---
```

## What's new


### Other features

 * Add search terms report (Noah van der Meer)
 * Add the ability to apply basic Page QuerySet optimizations to `specific()` sub-queries using `select_related` & `prefetch_related`, see [](../reference/pages/queryset_reference.md) (Andy Babic)
 * Increase `DATA_UPLOAD_MAX_NUMBER_FIELDS` in project template (Matt Westcott)
 * Stop invalid Site hostname records from breaking preview (Matt Westcott)
 * Set sensible defaults for InlinePanel heading and label (Matt Westcott)
 * Limit tags autocompletion to 10 items and add delay to avoid performance issues with large number of matching tags (Aayushman Singh)
 * Add the ability to restrict what types of requests a Pages supports via [`allowed_http_methods`](#wagtail.models.Page.allowed_http_methods) (Andy Babic)

### Bug fixes

 * Improve handling of translations for bulk page action confirmation messages (Matt Westcott)
 * Ensure custom rich text feature icons are correctly handled when provided as a list of SVG paths (Temidayo Azeez, Joel William, LB (Ben) Johnston)
 * Ensure manual edits to `StreamField` values do not throw an error (Stefan Hammer)
 * Fix sub-menus within the main menu cannot be closed on mobile (Bojan Mihelac)
 * Fix animation overflow transition when navigating through subpages in the sidebar page explorer (manu)
 * Ensure form builder supports custom admin form validation (John-Scott Atlakson, LB (Ben) Johnston)
 * Ensure form builder correctly checks for duplicate field names when using a custom related name (John-Scott Atlakson, LB (Ben) Johnston)
 * Normalize `StreamField.get_default()` to prevent creation forms from breaking (Matt Westcott)
 * Prevent out-of-order migrations from skipping creation of image/document choose permissions (Matt Westcott)
 * Use correct connections on multi-database setups in database search backends (Jake Howard)
 * Ensure Cloudfront cache invalidation is called with a list, for compatibility with current botocore versions (Jake Howard)
 * Show the correct privacy status in the sidebar when creating a new page (Joel William)
 * Prevent generic model edit view from unquoting non-integer primary keys multiple times (Matt Westcott)

### Documentation

 * Move the [model reference page](../reference/models.md) from reference/pages to the references section as it covers all Wagtail core models (Srishti Jaiswal)
 * Move the [panels reference page](../reference/panels.md) from references/pages to the references section as panels are available for any model editing, merge panels API into this page (Srishti Jaiswal)
 * Move the tags documentation to standalone [advanced topic for tagging](../advanced_topics/tags.md), instead of being inside the reference/pages section (Srishti Jaiswal)
 * Refine the [](adding_reports) page so that common (page/non-page) class references are at the top and the full page only example has correct heading nesting (Alessandro Chitarrini)
 * Add the [`wagtail start`](wagtail_start) command to the management commands reference page (Damilola Oladele)
 * Refine the [](project_templates_reference) page sections and document common issues encountered when creating custom templates (Damilola Oladele)
 * Refine titles, references and URLS to better align with the documentation style guide, including US spelling (Srishti Jaiswal)
 * Recommend a larger `DATA_UPLOAD_MAX_NUMBER_FIELDS` when [integrating Wagtail into Django](../getting_started/integrating_into_django.md) (Matt Westcott)
 * Improve code highlighting and formatting for Python docstrings in core models (Srishti Jaiswal)
 * Update all JavaScript inline scripts & some CSS inline style tags to a CSP compliant approach by using external scripts/styles (Aayushman Singh)
 * Update usage of `mark_safe` to `format_html` for any script inclusions, to better avoid XSS issues from example code (Aayushman Singh)
 * Update documentation writing guidelines to [encourage better considerations](documentation_code_example_considerations) of security, accessibility and good practice when writing code examples (Aayushman Singh, LB (Ben) Johnston)
 * Update documentation guidelines on writing links and API reference (Sage Abdullah)
 * Replace absolute URLs with intersphinx links where possible to avoid broken links (Sage Abdullah)
 * Update upgrading guide and release process to better reflect the current practices (Sage Abdullah)
 * Document usage of [Custom validation for admin form pages](form_builder_custom_admin_validation) when using `AbstractEmailForm` or `AbstractForm` pages (John-Scott Atlakson, LB (Ben) Johnston)
 * Reword `BlogTagIndexPage` example for clarity (Clifford Gama)
 * Change title of blog index page in tutorial to avoid slug issues (Thibaud Colas)
 * Fix `wagtailcache` and `wagtailpagecache` examples to not use quotes for the `fragment_name` (Shiv)
 * Update tutorial to reflect the move of the "Add child page" action to a top-level button in the header as a '+' icon (Clifford Gama)
 * Fix link to `HTTPMethod` in `Page.handle_options_request()` docs (Sage Abdullah)
 * Improve [](pages_theory) with added & more consistent section headings and admonitions to aid in readability (Clifford Gama)
 * Fix non-functional link to the community guidelines in the [Your first contribution](../contributing/first_contribution_guide.md) page (Ankit Kumar)

### Maintenance

 * Close open files when reading within utils/setup.py (Ataf Fazledin Ahamed)
 * Avoid redundant `ALLOWED_HOSTS` check in `Site.find_for_request` (Jake Howard)
 * Update `CloneController` to ensure that `added`/`cleared` events are not dispatched as cancelable (LB (Ben) Johnston)
 * Remove unused `uuid` UMD module as all code is now using the NPM module (LB (Ben) Johnston)
 * Clean up JS comments throughout codebase to be aligned to JSDoc where practical (LB (Ben) Johnston)
 * Replace `eslint-disable no-undef` linter directives with `global` comments (LB (Ben) Johnston)
 * Upgrade Node tooling to active LTS version 22 (LB (Ben) Johnston)
 * Remove defunct oEmbed providers (Rahul Samant)
 * Remove obsolete non-upsert-based code for Postgres search indexing (Jake Howard)
 * Remove unused Rangy JS library (LB (Ben) Johnston)
 * Update `PreviewController` usage to leverage Stimulus actions instead of calling `preventDefault` manually (Ayaan Qadri)
 * Various performance optimizations to page publishing (Jake Howard)
 * Remove unnecessary DOM canvas.toBlob polyfill (LB (Ben) Johnston)
 * Ensure Storybook core files are correctly running through Eslint (LB (Ben) Johnston)
 * Add a new Stimulus `ZoneController` (`w-zone`) to support dynamic class name changes & event handling on container elements (Ayaan Qadri)
 * Migrate jQuery class toggling & drag/drop event handling within the multiple upload views to the Stimulus ZoneController usage (Ayaan Qadri)
 * Test project template for warnings when run against Django pre-release versions (Sage Abdullah)
 * Refactor redirects create/delete views to use generic views (Sage Abdullah)
 * Add JSDoc description, adopt linting recommendations, and add more unit tests for `ModalWorkflow` (LB (Ben) Johnston)
 * Add support for for a `delay` value in `TagController` to debounce async autocomplete tag fetch requests (Aayushman Singh)
 * Add unit tests, Storybook stories & JSDoc items for the Stimulus `DrilldownController` (Srishti Jaiswal)
 * Enhance sidebar preview performance by eliminating duplicate asset loads on preview error (Sage Abdullah)


## Upgrade considerations - changes affecting all projects

### `DATA_UPLOAD_MAX_NUMBER_FIELDS` update

It's recommended that all projects set the `DATA_UPLOAD_MAX_NUMBER_FIELDS` setting to 10000 or higher.

This specifies the maximum number of fields allowed in a form submission, and it is recommended to increase this from Django's default of 1000, as particularly complex page models can exceed this limit within Wagtail's page editor:

```python
# settings.py
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10_000
```

### Form builder - validation of fields with custom `related_name`

On previous releases, form page models (defined through `AbstractEmailForm`, `AbstractForm`, `FormMixin` or `EmailFormMixin`) did not validate form fields where the `related_name` was different to the default value of `form_fields`. As a result, it was possible to create forms with duplicate field names - in this case, only a single field is displayed and captured in the resulting form. As of Wagtail 6.4, validation is now applied on these fields. Existing forms will continue to behave as before and no data will be lost, but editing them will now raise a validation error.

## Upgrade considerations - deprecation of old functionality

## Upgrade considerations - changes affecting Wagtail customizations

## Upgrade considerations - changes to undocumented internals

### Removal of unused Rangy JS library

The unused JavaScript include `wagtailadmin/js/vendor/rangy-core.js` has been removed from the editor interface, and functions such as `window.rangy.getSelection()` are no longer available. Any code relying on this should now either supply its own copy of the [Rangy library](https://github.com/timdown/rangy), or be migrated to the official [`Document.createRange()`](https://developer.mozilla.org/en-US/docs/Web/API/Range) browser API.
