djangowagtail

Wagtail field change does not show up in Page Revisions


I have a field on a Wagtail Page model(BlogPage) that is a m2m to a Django model(ExternalAuthor).

When this field is changed(i.e adding or removing an ExternalAuthor) to a BlogPage, this change is NOT logged in the page revision.

I'm wondering if I need to extend from something specific or somehow enable this feature somewhere for this specific field to force a log entry to the page revision?

The client would like to see this change as they have multiple people making content updates, and need to know who is adding/removing these ExternalAuthors from a BlogPage.

Update: This seems to not be an issue for us in a newer version of wagtail.


Solution

  • You should use modelcluster.fields.ParentalManyToManyField in place of the standard Django ManyToManyField. This handles the in-memory version of the relation that's necessary to work with Wagtail's revisions, drafts and previews.

    For an example of this in use, see the Authors relation in the Wagtail tutorial.