From daea09b99619ebaccf2000b72bfe207a009cd744 Mon Sep 17 00:00:00 2001 From: Filip Weidemann Date: Tue, 13 May 2025 15:56:06 +0200 Subject: [PATCH 1/2] fix: only set djangocms_versioning migration 0015 as a dependency of 0010 data migration if versioning is enabled in the config --- .../migrations/0010_cms4_grouper_version_data_migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/djangocms_snippet/migrations/0010_cms4_grouper_version_data_migration.py b/src/djangocms_snippet/migrations/0010_cms4_grouper_version_data_migration.py index 1354cb0a..f7061bf9 100644 --- a/src/djangocms_snippet/migrations/0010_cms4_grouper_version_data_migration.py +++ b/src/djangocms_snippet/migrations/0010_cms4_grouper_version_data_migration.py @@ -57,7 +57,7 @@ class Migration(migrations.Migration): ('djangocms_snippet', '0009_auto_20210915_0445'), ] - if djangocms_versioning_installed: + if djangocms_versioning_installed and djangocms_versioning_config_enabled: dependencies += [('djangocms_versioning', '0015_version_modified'), ] operations = [ From 0f373a65040583ec190a66789780c39c648f242d Mon Sep 17 00:00:00 2001 From: Filip Weidemann Date: Tue, 13 May 2025 21:16:13 +0200 Subject: [PATCH 2/2] chore: update README.rst to include information about cms 3.1 upgrades --- README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.rst b/README.rst index d8b9a40e..59d5035e 100644 --- a/README.rst +++ b/README.rst @@ -121,6 +121,14 @@ Known Issues When adding a snippet with the `object` or `embed` tag as root element, the CMS toolbar crashes, making any further editing of the page difficult or impossible. A workaround is to just put those elements inside a `div` tag. +**Versioning for djangocms-snippet installations that migrated to version 5.0.0 on django CMS 3.11** + +If you are upgrading from a django CMS 3.11 installation to django CMS 4.1 or later, please be aware of the following: + +While `djangocms-snippet` includes a migration (``0010_cms4_grouper_version_data_migration``) designed to create initial versions for existing snippets when `djangocms_versioning` is enabled, this migration may not retroactively apply versioning to snippets that existed in a django CMS 3.11 environment if you already migrated to `djangocms-snippet` version 5.0.0. +Therefore, if you are upgrading from a django CMS 3.11 with `djangocms_snippet` already at version 5.0.0, you will currently not be able to enable versioning for your snippets. +This might be fixed in a future release. + Running Tests -------------