Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix draft deletion bug on Django CMS 4.0.x #233

Conversation

fscherf
Copy link
Contributor

@fscherf fscherf commented Apr 9, 2024

This is a backport of #215 for issue #214

…cms#215)

* fix djangocms-versioning draft deletion bug (django-cms#214)

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.

Signed-off-by: Florian Scherf <[email protected]>

* ci: auto fixes from pre-commit hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Florian Scherf <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@fscherf
Copy link
Contributor Author

fscherf commented Apr 9, 2024

@joshyu: The Django 4.2 tests seem to break because https://github.com/joshyu/djangocms-versioning/tarball/feat/django-42-compatible#egg=djangocms-versioning from tests/requirements/django_42.txt is not available. Can you fix that on your side?

@joshyu
Copy link
Contributor

joshyu commented Apr 11, 2024

@joshyu: The Django 4.2 tests seem to break because https://github.com/joshyu/djangocms-versioning/tarball/feat/django-42-compatible#egg=djangocms-versioning from tests/requirements/django_42.txt is not available. Can you fix that on your side?

@fscherf ,
please help to update line 10 of tests/requirements/django_42.txt
from https://github.com/joshyu/djangocms-versioning/tarball/feat/django-42-compatible#egg=djangocms-versioning
to https://github.com/django-cms/djangocms-versioning/tarball/support/django-cms-4.0.x#egg=djangocms-versioning

as my feat branch has been merged into support/django-cms-4.0.x

@joshyu
Copy link
Contributor

joshyu commented Apr 11, 2024

Hi @fscherf ,
LGTM. please merge it.

@FinalAngel FinalAngel merged commit db0b6c4 into django-cms:support/django-cms-4.0.x Apr 11, 2024
15 checks passed
@fscherf fscherf deleted the fscherf/fix-draft-deletion-bug-on-django-cms-4.0.x branch April 11, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants