-
-
Notifications
You must be signed in to change notification settings - Fork 577
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
Cannot create a page with short name "contributors" #3441
Comments
I am new to Volto @iFlameing can you please specify the issue |
@harshit-dugar Try to give a page Title contributors you will be not able to solve the page. |
We need to create a static list in Volto with reserved words (e.g. "contributors", "search") and make sure the Volto UI tells editors when they want to add or edit an ID that matches our reserved words list. @robgietema @sneridagh if I am not mistaken we worked on something like this in one of our client projects. |
I think this should be done on the backend level and emit a proper error through the REST API when creating a content with such URLs |
@tisto we already do it in the widget ID in core (see below), but in the use case of "add" form, the main check happens on the backend, on POST. As @erral hinted the RESTAPI response should be more explicit in the case of clash. Could be that the error provided in Dexterity won't be enough descriptive even... so it might require more changes than fixing only RESTAPI. /cc @davisagli @jaroel Using a static list of reserved words, in the config: https://github.com/plone/volto/blob/main/src/components/manage/Widgets/IdWidget.jsx#L101 Checking the current list of indexes: https://github.com/plone/volto/blob/main/src/components/manage/Widgets/IdWidget.jsx#L147-L149 And checking for special characters: https://github.com/plone/volto/blob/main/src/components/manage/Widgets/IdWidget.jsx#L142-L145C6 |
I think we don't even have such a list in the backend... I tried once to track down how was this controlled on Plone or Zope level (because a client added a page named |
This is related to plone/plone.restapi#1613 |
Also related to #3716 and #4686 (comment) |
If I name the page contributors then I am unable to save.
The text was updated successfully, but these errors were encountered: