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

Internal url widget (from TinyMCE link) has current path at a page, instead of its container #2664

Closed ewohnlich closed 1 year ago

ewohnlich commented 5 years ago

What I did:

On the front page of a new Plone site, create a link in the wysiwyg and use the Internal option

What I expect to happen:

I expect the "Current path" to start from the page's container.

What actually happened:

The base path starts from the front page. This effectively means that none of my searches will work until I change the "current path"

I believe the problem is actually in plone.app.widget.utils. The get_relateditems_options function there does attempt to check if the current base path context is folderish, but I believe it does so insufficiently.

(Pdb) base_path_context
<Document at /ootb/front-page used for /ootb/front-page>
(Pdb) aq_parent(base_path_context)
<Document at /ootb/front-page>

So obviously in this case aq_parent doesn't actually yield the container.

What version of Plone/ Addons I am using:

Plone 5.1.4

jensens commented 1 year ago

I close the issue, because it addresses a Plone version that is no longer supported. If you think this is wrong please reopen the issue and assign a matching milestone.