Fix commenting not working on pages with read_only FieldPanels

Fixes 
pull/12570/head
Strapchay 2024-11-27 13:15:10 +01:00 zatwierdzone przez LB (Ben Johnston)
rodzic 79c9ce266c
commit b3ba89b2ec
4 zmienionych plików z 4 dodań i 1 usunięć
client/src/entrypoints/admin
docs/releases

Wyświetl plik

@ -24,6 +24,7 @@ Changelog
* Fix: Ensure Cloudfront cache invalidation is called with a list, for compatibility with current botocore versions (Jake Howard)
* Fix: Show the correct privacy status in the sidebar when creating a new page (Joel William)
* Fix: Prevent generic model edit view from unquoting non-integer primary keys multiple times (Matt Westcott)
* Fix: Ensure comments are functional when editing Page models with `read_only` `Fieldpanel`s in use (Strapchay)
* Docs: Move the model reference page from reference/pages to the references section as it covers all Wagtail core models (Srishti Jaiswal)
* Docs: Move the panels reference page from references/pages to the references section as panels are available for any model editing, merge panels API into this page (Srishti Jaiswal)
* Docs: Move the tags documentation to standalone advanced topic, instead of being inside the reference/pages section (Srishti Jaiswal)

Wyświetl plik

@ -856,6 +856,7 @@
* Steven Steinwand
* Clifford Gama
* Noah van der Meer
* Strapchay
## Translators

Wyświetl plik

@ -19,7 +19,7 @@ window.comments = (() => {
function getContentPath(fieldNode) {
// Return the total contentpath for an element as a string, in the form field.streamfield_uid.block...
if (fieldNode.closest('[data-contentpath-disabled]')) {
if (!fieldNode || fieldNode.closest('[data-contentpath-disabled]')) {
return '';
}
let element = fieldNode.closest('[data-contentpath]');

Wyświetl plik

@ -37,6 +37,7 @@ depth: 1
* 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)
* Ensure comments are functional when editing Page models with `read_only` `Fieldpanel`s in use (Strapchay)
### Documentation