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

Impossible to add/save existing content tile #149

Open
boulch opened this issue Nov 14, 2023 · 0 comments
Open

Impossible to add/save existing content tile #149

boulch opened this issue Nov 14, 2023 · 0 comments

Comments

@boulch
Copy link

boulch commented Nov 14, 2023

When I try to add existing content tile, if plone.app.standardtiles.content_views is empty, the field view_template (display mode) is never valid because of :

voc = [SimpleVocabulary.createTerm("", "", "Default view")]

Field is required but value is always empty.

Screenshot from 2023-11-14 11-30-18

In the following code, we check if view_template is empty to get default view (context.getLayout) :

view_name = self.data.get("view_template") or context.getLayout()

To fix that, IMHO, the field view_template must not be required here :

view_template = schema.Choice(
title=_("Display mode"),
source=_("Available Content Views"),
required=True,
)

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

No branches or pull requests

2 participants