wagtail-autocomplete icon indicating copy to clipboard operation
wagtail-autocomplete copied to clipboard

page history not working on field with AutocompletePanel

Open Jean-Zombie opened this issue 3 years ago • 4 comments

I have an AutocompletePanel sucessfuly assigned to one of my fields. Everything works as expected but page history does not reflect changes made to the corresponding field. If I inspect the content_json field of the two PageRevision pages in question, I do see the change. Yet in the admin UI of the "history" of my page where I compare versions they are marked as identical.

Simply switching back to a FieldPanel correctly shows the changes applied in the admin UI.

Am I missing something in my implementation or is this a bug? Kind regards.

Jean-Zombie avatar Aug 26 '21 14:08 Jean-Zombie

Sounds like a bug! Thanks for the report

harrislapiroff avatar Aug 30 '21 16:08 harrislapiroff

Having taken a look at what wagtail is doing under the covers to render the page history, IMO this is being caused by our autocomplete widget not having an is_hidden property that returns False. Putting together a PR as soon as I can figure out a good way to test this.

chigby avatar Aug 31 '21 21:08 chigby

Looking even further into this, I'm finding that I get the correct behavior if I install this package directly from the latest commit to the github repo. So it may already be fixed (mostly likely by #69) and we need to release a new version.

chigby avatar Sep 01 '21 16:09 chigby

That sounds promising. Many thanks for looking into it!

Jean-Zombie avatar Sep 01 '21 16:09 Jean-Zombie