plone / Products.CMFPlone

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

URL in Plone with problems? #2944

Closed claytonc closed 5 years ago

claytonc commented 5 years ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

I created folders, subfolders and page in plone site:

What I expect to happen:

When accessing as follows URLs always returns a page and not a 404, and when authenticated actions not show:

  1. http://localhost:8080/plone/folder-1/sub-folder-1 - status 200 and show folder

  2. http://localhost:8080/plone/folder-1/sub-folder-1/page-1 - status 200 and show page

  3. http://localhost:8080/plone/folder-1/folder-2/sub-folder-1 - status 404 and not show page

  4. http://localhost:8080/plone/folder-1/folder-2/sub-folder-1/page-1 - status 404 and not show page

  5. http://localhost:8080/plone/folder-1/folder-2/sub-folder-1/folder-2/page-1 - status 404 and not show page

What actually happened:

  1. http://localhost:8080/plone/folder-1/folder-2/sub-folder-1 - status 200 and show folder
  2. http://localhost:8080/plone/folder-1/folder-2/sub-folder-1/page-1 - status 200 and show page
  3. http://localhost:8080/plone/folder-1/folder-2/sub-folder-1/folder-2/page-1 -status 200 and show page

Test in plone.org:

  1. https://plone.org/news/2019/the-guardians-of-the-zope-and-plone-galaxy

  2. https://plone.org/foundation/contributors-agreement

  3. https://plone.org/community/framework

This behavior is normal or bug?

What version of Plone/ Addons I am using:

Test in plone 4.3.x and 5.1.x and no addons extras

erral commented 5 years ago

This behaviour is normal due to Zope's Acquisition mechanism, you can read more about Acquistion here: https://zope.readthedocs.io/en/latest/zopebook/Acquisition.html

You can check collective.redirectacquired if you want to redirect to the proper folder when reaching that kind of URLs