plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
245 stars 188 forks source link

Plone site id is a reserved id and can't be used any where in Zope as an short name #3823

Closed MrTango closed 1 year ago

MrTango commented 1 year ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

Add a Plone site with the id example. Add another Plone side with any other name. In the second Plone side, try to create a Document with the title example.

You'll get a trace:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 390, in publish_module
  Module ZPublisher.WSGIPublisher, line 285, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module plone.z3cform.layout, line 61, in __call__
  Module plone.z3cform.layout, line 45, in update
  Module plone.dexterity.browser.add, line 136, in update
  Module plone.z3cform.fieldsets.extensible, line 62, in update
  Module plone.z3cform.patch, line 31, in GroupForm_update
  Module z3c.form.group, line 145, in update
  Module plone.app.z3cform.csrf, line 21, in execute
  Module z3c.form.action, line 98, in execute
  Module z3c.form.button, line 301, in __call__
  Module z3c.form.button, line 159, in __call__
  Module plone.dexterity.browser.add, line 114, in handleAdd
  Module z3c.form.form, line 265, in createAndAdd
  Module plone.dexterity.browser.add, line 89, in add
  Module plone.dexterity.utils, line 174, in addContentToContainer
  Module Products.BTreeFolder2.BTreeFolder2, line 434, in _setObject
  Module plone.folder.ordered, line 253, in _checkId
  Module Products.CMFCore.PortalFolder, line 318, in _checkId
  Module OFS.ObjectManager, line 130, in checkValidId
zExceptions.BadRequest: The id "example" is reserved.

What I expect to happen:

Having a page with the id example.

What actually happened:

Got the trace above. A Plone site id should not be blocked to be used in other places for object id's.

What version of Plone/ Addons I am using:

Plone 6.0.6