Allow to create content with index_html id on the site root.#107
Conversation
|
@thet thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
67aeb71 to
30af74b
Compare
davisagli
left a comment
There was a problem hiding this comment.
@thet Do things actually work once the item is created? My recollection is that traversal will find attributes (i.e. the index_html method on PloneSite) before it looks for subitems using getitem. That's the main reason that this code tries to prevent using names that would be found as attributes.
|
@davisagli yes, it works - the I'm preparing another PR in CMFPlone which removes line below which sets |
`index_html` are often used to create default pages in containers. On the portal root this was prevented by a problem in a name collision checker in plone.base, fixed in plone/plone.base#107 and a plone.protect warning issued by a write-on-read by setting the `__replaceable__` attribute on the `index_html` object. Fixes: #4279
`index_html` are often used to create default pages in containers. On the portal root this was prevented by a problem in a name collision checker in plone.base, fixed in plone/plone.base#107 and a plone.protect warning issued by a write-on-read by setting the `__replaceable__` attribute on the `index_html` object. Fixes: #4279
The portal root has a `index_html` method which prevented content with the id `index_html` to be created and used as a default page. Fixes: plone/Products.CMFPlone#4278
30af74b to
98fdc66
Compare
`index_html` are often used to create default pages in containers. On the portal root this was prevented by a problem in a name collision checker in plone.base, fixed in plone/plone.base#107 and a plone.protect warning issued by a write-on-read by setting the `__replaceable__` attribute on the `index_html` object. Fixes: #4279
Branch: refs/heads/master Date: 2026-02-20T20:55:20+01:00 Author: Johannes Raggam (thet) <thetetet@gmail.com> Commit: plone/Products.CMFPlone@ba5ba5e Avoid a plone.protect warning on `index_html` documents in portal root. `index_html` are often used to create default pages in containers. On the portal root this was prevented by a problem in a name collision checker in plone.base, fixed in plone/plone.base#107 and a plone.protect warning issued by a write-on-read by setting the `__replaceable__` attribute on the `index_html` object. Fixes: plone/Products.CMFPlone#4279 Files changed: A news/4279.bugfix.md M src/Products/CMFPlone/Portal.py M src/Products/CMFPlone/tests/testPortalCreation.py Repository: Products.CMFPlone Branch: refs/heads/master Date: 2026-02-23T17:16:33+01:00 Author: Johannes Raggam (thet) <thetetet@gmail.com> Commit: plone/Products.CMFPlone@8b0f067 Merge pull request #4281 from plone/thet/4279-index-html Avoid a plone.protect warning on `index_html` documents in portal root. Files changed: A news/4279.bugfix.md M src/Products/CMFPlone/Portal.py M src/Products/CMFPlone/tests/testPortalCreation.py
First this needs to be merged in order to get the z3c.dependencychecker check green:
#108
The portal root has a
index_htmlmethod which prevented content with the idindex_htmlto be created and used as a default page.Fixes: plone/Products.CMFPlone#4278
If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.
Closes plone/Products.CMFPlone#4278