django-cms / djangocms-alias

Other
8 stars 23 forks source link

fix djangocms-versioning draft deletion bug (#214) #215

Closed fscherf closed 5 months ago

fscherf commented 6 months ago

Previously, djangocms_alias.models.AliasContent.delete deleted all plugins related to AliasContent.alias, with the same language. Drafts and previously published versions included. This meant that the deletion of a draft resulted in plugins disappearing from published pages.

This patch removes the mechanism entirely and instead adds a warning, notifying the user that the last version or translation of a language got deleted.

fscherf commented 6 months ago

@fsbraun Thanks for your review. I applied both requested changes

fscherf commented 6 months ago

@fsbraun: Is there anything else that I can do?

fscherf commented 6 months ago

@fsbraun: What is the state of this PR? Can it be merged?

fsbraun commented 6 months ago

@fscherf LGTM! I will give it a test asap and merge afterwards!

fsbraun commented 6 months ago

So, tests should pass again!

fsbraun commented 6 months ago

@fscherf I can confirm, that deleting the alias draft does not remove all connected alias plugins. However, I fail to get the new message. Can you point me to where I should be seeing this?

fscherf commented 6 months ago

@fsbraun: Ah! It seems, the message is not shown when using djangocms-versioning, because it overrides the delete method.

fscherf commented 6 months ago

@fsbraun: It works, but the message does not show up in all cases. Is that enough, or do we need to change plans here?

fscherf commented 5 months ago

What's the state of this PR?