diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fabc4cf778..ecd9d8b060 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -33,6 +33,7 @@ Changelog * Fix: `search_garbage_collect` management command now works when wagtailsearchpromotions is not installed (Morgan Aubert) * Fix: `wagtail.contrib.settings` context processor no longer fails when `request.site` is unavailable (Diederik van der Boor) * Fix: `TableBlock` content is now indexed for search (Morgan Aubert) + * Fix: `Page.copy()` is now marked as `alters_data`, to prevent template code from triggering it (Diederik van der Boor) 1.7 (20.10.2016) diff --git a/docs/releases/1.8.rst b/docs/releases/1.8.rst index 6a276fb713..9228a8f506 100644 --- a/docs/releases/1.8.rst +++ b/docs/releases/1.8.rst @@ -64,6 +64,7 @@ Bug fixes * ``search_garbage_collect`` management command now works when wagtailsearchpromotions is not installed (Morgan Aubert) * ``wagtail.contrib.settings`` context processor no longer fails when ``request.site`` is unavailable (Diederik van der Boor) * ``TableBlock`` content is now indexed for search (Morgan Aubert) + * Fix: ``Page.copy()`` is now marked as ``alters_data``, to prevent template code from triggering it (Diederik van der Boor) Upgrade considerations diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index d0ba4894e1..4cef026b71 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -1182,6 +1182,8 @@ class Page(six.with_metaclass(PageBase, AbstractPage, index.Indexed, Clusterable return page_copy + copy.alters_data = True + def permissions_for_user(self, user): """ Return a PagePermissionsTester object defining what actions the user can perform on this page