django-cms
                                
                                 django-cms copied to clipboard
                                
                                    django-cms copied to clipboard
                            
                            
                            
                        [BUG] cannot delete page
Description
Cannot delete a page.
Steps to reproduce
- fresh installation of 4.1 + one superuser account
- create a home page
- create a subpage
- open admin
- navigate to "Page contents"
- under burger menu on the very end of a page table row "Delete..."
- no-persmissions page
Expected behaviour
To be able to delete a page.
Actual behaviour
Cannot delete a page.
Screenshots
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.
Temporary workaround is via versioning: Page content versions -> choose the page -> submit -> Discard the version (page gets entirely deleted).
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.)
(Potentially is a duplicate of #7745, fixed in #7747 - to be verified)
@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 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 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 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.
@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.
That might be a good point but there are 2 things that tell me that the current solution is bad:
- why show an icon next to a page for deleting when the action simply doesn't work?
- the "accidental" page deletion can happen and that's exactly why there is the confirmation page.
@im-n1 Any news on my question? https://github.com/django-cms/django-cms/issues/7830#issuecomment-1976699577
Sadly I have no opportunity to try so anymore.