wagtail/docs/releases/6.5.md

6.7 KiB

Wagtail 6.5 release notes - IN DEVELOPMENT

Unreleased

---
local:
depth: 1
---

What's new

Django 5.2 support

This version adds formal support for Django 5.2.

Other features

  • Add WAGTAIL_ prefix to Wagtail-specific tag settings (Aayushman Singh)
  • Implement normalize on TypedTableBlock to assist with setting default and preview_value (Sage Abdullah)
  • Apply normalization when modifying a StreamBlock's value to assist with programmatic changes to StreamField (Matt Westcott)
  • Allow a custom image rendition model to define its unique constraint with models.UniqueConstraint instead of unique_together (Oliver Parker, Cynthia Kiser, Sage Abdullah)
  • Default to the standard tokenizer on Elasticsearch, to correctly handle numbers as tokens (Matt Westcott)
  • Add color-scheme meta tag to Wagtail admin (Ashish Nagmoti)
  • Add the ability to set the default privacy restriction for new pages using get_default_privacy_setting (Shlomo Markowitz)
  • Improve performance of batch purging page urls in the frontend cache, avoiding n+1 query issues (Andy Babic)
  • Add better support and documentation for overriding or extending icons used in the in the userbar (Sébastien Corbin)

Bug fixes

  • Take preferred language into account for translatable strings in client-side code (Bernhard Bliem, Sage Abdullah)
  • Support translating with the preferred language for rich text formatting labels (Bernhard Bliem, Sage Abdullah)
  • Make "Actions" label translatable within the rich text toolbar (Bernhard Bliem, Sage Abdullah)
  • Do not show the content type column as sortable when searching pages (Srishti Jaiswal, Sage Abdullah)
  • Support simple subqueries for in and exact lookup on Elasticsearch (Sage Abdullah)
  • Force preview panel scroll behavior to instant to avoid flickering (Sage Abdullah)
  • Fix incorrect "Views (past week)" heading on promoted search results listing (Baptiste Mispelon)
  • Ensure InlinePanel will be correctly ordered after the first save when min_num is used (Elhussein Almasri, Joel William)
  • Avoid deprecation warnings about URLField assume_scheme on Django 5.x (Sage Abdullah)
  • Fix setup.cfg syntax for setuptools v78 (Sage Abdullah)
  • Ensure ImproperlyConfigured is thrown from db_field on unbound FieldPanels as intended (Matt Westcott)
  • Refine the positioning of the add comment button next to select, radio, checkbox fields and between field row columns (Srishti Jaiswal)

Documentation

  • Add missing django.contrib.admin to list of apps in "add to Django project" guide (Mohamed Rabiaa)
  • Add tutorial on deploying on Ubuntu to third-party tutorials (Mohammad Fathi Rahman)
  • Document that request_or_site is optional on BaseGenericSetting.load (Matt Westcott)
  • Mention third-party StreamField based form builder packages in the form builder documentation (Matt Westcott)

Maintenance

  • Migrate away from deprecated Sass import rules to module system (Srishti Jaiswal)
  • Apply Sass mixed declarations migration in preparation for CSS nesting (Prabhpreet Kaur)
  • Refactor styles for Draftail, minimap, and comments to fix remaining Sass migration warnings (Thibaud Colas)
  • npm package updates; downshift, focus-trap-react, immer, redux, uuid (LB (Ben) Johnston)
  • Validate against invalid characters in Lexeme values (Matt Westcott)
  • Split up wagtail.models module into submodules (Matt Westcott)
  • Update ruff to 0.9.6 (Sage Abdullah)
  • Fix up stubs & adapter contents to better support Jest testing (LB (Ben) Johnston)
  • Cleanup Stimulus controller imports, JSDoc & linting (LB (Ben) Johnston)
  • Rename SkipLinkController to FocusController with improved reusability, updated unit tests, and added story (LB (Ben) Johnston)
  • Fix CI testing issues with the Stimulus LocaleController time zones & non-deterministic page ordering tests (Sage Abdullah)
  • Make GitHub highlight .html files as Django templates (Jake Howard)
  • Remove admin JavaScript imports from shared template includes, moving the imports to the appropriate core admin inclusion locations (Sai Srikar Dumpeti)
  • Remove non-editing view inclusions of the insert_editor_js hook output, deprecate the wrapper template tag _editor_js.html (Sai Srikar Dumpeti, LB (Ben) Johnston)
  • Remove upper bound on Django dependency (Matt Westcott)

Upgrade considerations - changes affecting all projects

Page.save() no longer automatically calls full_clean for draft pages

In previous releases, the save() method on page models called the full_clean method to apply model-level validation rules, regardless of whether the page was in a draft or live state, unless this was explicitly disabled by passing clean=False. As of this release, saving a page in a draft state (live=False) will only perform the minimum validation necessary to ensure data integrity: the title must be non-empty, and the slug must be unique within the parent page. Saving a page with live=True will apply full validation as before. If you have user code that creates draft pages and requires them to be validated, you must now call full_clean explicitly.

Upgrade considerations - deprecation of old functionality

TAG_LIMIT and TAG_SPACES_ALLOWED settings renamed to WAGTAIL_TAG_LIMIT and WAGTAIL_TAG_SPACES_ALLOWED

The TAG_LIMIT and TAG_SPACES_ALLOWED settings have been renamed to WAGTAIL_TAG_LIMIT and WAGTAIL_TAG_SPACES_ALLOWED respectively. The old settings will continue to work for now, but will be removed in a future release.

Upgrade considerations - changes affecting Wagtail customisations

Upgrade considerations - changes to undocumented internals

Removal of insert_editor_js hook output in some non-editor views

The insert_editor_js was historically added to some non editing views, these have now been removed.

The confirm bulk move view and the chooser modal view for choosing the new location of bulk move pages will no longer use the hook output insert_editor_js. If custom JavaScript is needed in these views, migrate to the documented hook instead.

The insert_editor_js hook will continue to be output when editing pages, as documented.

Deprecation of wagtail/admin/templates/wagtailadmin/pages/_editor_js.html template

If your project overrides the undocumented template partial wagtail/admin/templates/wagtailadmin/pages/_editor_js.html to inject custom JavaScript into the Wagtail admin, this template will be removed in a future release.

Instead, follow the documented approaches to either use the hook or the hook.