django-cms icon indicating copy to clipboard operation
django-cms copied to clipboard

[BUG] cannot delete page

Open im-n1 opened this issue 1 year ago • 11 comments

Description

Cannot delete a page.

Steps to reproduce

  1. fresh installation of 4.1 + one superuser account
  2. create a home page
  3. create a subpage
  4. open admin
  5. navigate to "Page contents"
  6. under burger menu on the very end of a page table row "Delete..."
  7. no-persmissions page

Expected behaviour

To be able to delete a page.

Actual behaviour

Cannot delete a page.

Screenshots

image

Translation: Deleting an item of type page "" would result in the deletion of related items. However, you do not have permission to delete items of the following types:

Additional information (CMS/Python/Django versions)

Do you want to help fix this issue?

  • [ ] Yes, I want to help fix this issue and I will join #workgroup-pr-review on Slack to confirm with the community that a PR is welcome.
  • [x] No, I only want to report the issue.

im-n1 avatar Mar 04 '24 11:03 im-n1

Temporary workaround is via versioning: Page content versions -> choose the page -> submit -> Discard the version (page gets entirely deleted).

im-n1 avatar Mar 04 '24 12:03 im-n1

Thanks for bringing this to our attention. Can you check if this persists if you set your user language to English? (I'm trying to hunt down the reason for this message.)

fsbraun avatar Mar 04 '24 14:03 fsbraun

(Potentially is a duplicate of #7745, fixed in #7747 - to be verified)

fsbraun avatar Mar 04 '24 15:03 fsbraun

@im-n1 I also had problems with versioning and deleting the whole page, what helped was adding to settings.py:

DJANGOCMS_VERSIONING_ALLOW_DELETING_VERSIONS = True

Maybe you will find it helpful.

aacimov avatar Mar 14 '24 14:03 aacimov

@aacimov sadly no luck - the "confirmation delete page" still has no submit button.

On top of that https://github.com/django-cms/djangocms-versioning/blob/master/docs/settings.rst is empty so I have absolutely no info.

im-n1 avatar Mar 25 '24 19:03 im-n1

@im-n1 have you tried going to Page content versions - select your desired page from the dropdown and delete all of the versions? After that you should be able to delete the whole page.

If this does not help try pulling the page on the root level (side-by-side with your Homepage) and then try it.

Let us know.

aacimov avatar Mar 25 '24 23:03 aacimov

@aacimov yes that works - actually that's the way I used before and is the only way to delete a page. But the reported problem persists.

im-n1 avatar Mar 26 '24 09:03 im-n1

@aacimov yes that works - actually that's the way I used before and is the only way to delete a page. But the reported problem persists.

Well, from my perspective this is a good thing since if you have users editing the page you don't want them to accidentally delete the whole page (I had this experience before). So double-action is a good thing from my end. I would not consider it a bug but actually a feature.

If they are certain, they should first delete all the versions and then the actual page.

To be honest I first looked at this as you are, but on the other hand it is a 2FA, haha.

aacimov avatar Mar 26 '24 10:03 aacimov

That might be a good point but there are 2 things that tell me that the current solution is bad:

  1. why show an icon next to a page for deleting when the action simply doesn't work?
  2. the "accidental" page deletion can happen and that's exactly why there is the confirmation page.

im-n1 avatar Mar 27 '24 11:03 im-n1

@im-n1 Any news on my question? https://github.com/django-cms/django-cms/issues/7830#issuecomment-1976699577

fsbraun avatar Mar 27 '24 12:03 fsbraun

Sadly I have no opportunity to try so anymore.

im-n1 avatar May 28 '24 07:05 im-n1