Skip to content

PloneSite acquired for itself in aq_chain #169

@jaroel

Description

@jaroel

We had https://github.com/zopefoundation/Products.CMFCore/blob/master/src/Products/CMFCore/explicitacquisition.py enabled, which made requests for (at least) site root fail.

The CMFCore behaviour is correct, just don't know why we have PloneSite twice in the aq_chain.

/Users/roel/.buildout/eggs/cp311/Products.CMFCore-3.2-py3.11.egg/Products/CMFCore/explicitacquisition.py(30)content_allowed()
-> return context.aq_chain == context.aq_inner.aq_chain
(Pdb) context
<PloneSite at /plone used for /plone>
(Pdb) context.aq_chain
[<PloneSite at /plone used for /plone>, <PloneSite at /plone>, , <ZPublisher.BaseRequest.RequestContainer object at 0x120a1f710>]
(Pdb) context.aq_inner.aq_chain
[<PloneSite at /plone>, , <ZPublisher.BaseRequest.RequestContainer object at 0x120a1f710>]
(Pdb)

Reproduce: explicitly enable the check or disable skipping it and then run the test test_site_root_get_request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions