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

Modal is used on an action after editing in controlpanel #3801

Closed
mauritsvanrees opened this issue Jun 12, 2023 · 0 comments · Fixed by plone/plone.base#49
Closed

Modal is used on an action after editing in controlpanel #3801

mauritsvanrees opened this issue Jun 12, 2023 · 0 comments · Fixed by plone/plone.base#49

Comments

@mauritsvanrees
Copy link
Member

Plone 6.0.5. Default behavior:

  • Create a Classic Plone Site.
  • On the home page, click Contents.
  • This opens a new page, as expected.

Now try this scenario:

  • Go to Site Setup, Actions control panel.
  • Find the Contents action under the Object Actions, and click to Edit.
  • Scroll to the bottom. Note that "Settings for pat-plone-modal" contains an empty dict {}.
  • Do not change anything, just click Save.
  • On the home page, click Contents again.
  • This opens in a modal, very much unwanted.

This is probably happening since plone/plone.base#27 was merged. This was released in plone.base 1.0.3, which already is used since Plone 6.0.2.

Solutions I see:

  1. Change the default value of modal to an empty string, instead of {}.
  2. Change whatever code is using this property, so an empty string does not trigger using a modal. But I guess this is the silent assumption (or maybe it is documented): if the modal setting contains at least something, even an empty dict, then this is the current way to signal to Plone that a modal should be used. If you just want a modal, and are happy with the default modal settings, then this makes sense.

I would say we go with solution 1. But if someone thinks solution 2 is better, I am happy to hear it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant