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

[BUG] With versioning enabled, "Show in Menu" does not work in page tree #7780

Open
1 of 2 tasks
jrief opened this issue Jan 24, 2024 · 3 comments
Open
1 of 2 tasks

Comments

@jrief
Copy link
Contributor

jrief commented Jan 24, 2024

Description

On the admin site, the page tree offers a checkbox named "Show in Menu". If djangocms-versioning is enabled, clicking on this checkbox shows an error.

Steps to reproduce

In the admin open the page tree:

Screenshot 2024-01-24 at 12 19 17

then click on one of the checkboxes in the "Menu" column.

On top of the page tree this error message will appear:

Screenshot 2024-01-24 at 12 20 30

Expected behaviour

I am well aware that enabling/disabling this setting is not possible with versioning enabled.
However, then this button shall be in read-only mode and not clickable.

Do you want to help fix this issue?

Yes, if we can agree on this: With djangocms-versioning enabled, the option show/hide in menu can only be changed through the page settings in their detail and not through the page tree.

  • 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.
  • No, I only want to report the issue.
@marksweb
Copy link
Member

Yes that suggestion make sense to me. So hide the column if versioning is installed?

I don't know if there's a better way to do this with the cms config. But I think this is an area we all need to learn more about in order to do things the right way for v4, utilising all the features

@fabian do you have any thoughts?

@fsbraun
Copy link
Sponsor Member

fsbraun commented Jan 29, 2024

Yes, I would support a change. Probably one that grays out checkboxes for non-draft versions.

Versioning implements a check framework, so that you can ask a model if you can do something, e.g. check_publish. (That might have been a nice thing to have had in the core.) You'll probably have to do check_modify for the Version object of the page content in the has_change_permission in the PageContent admin. This is subclassed in the cms_config.py file of versioning.

@fsbraun
Copy link
Sponsor Member

fsbraun commented Apr 2, 2024

I think this needs a design decision to move the menu visibility to the page level for django CMS 4.2

@fsbraun fsbraun added this to the 4.2 milestone Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants