plone / plone.app.contenttypes

Dexterity-based content types for Plone
https://pypi.org/project/plone.app.contenttypes
14 stars 48 forks source link

avoid using getPhysicalPath in link_redirect_view display #709

Open yurj opened 4 days ago

yurj commented 4 days ago

https://github.com/plone/plone.app.contenttypes/blob/450888e2e4d8fa824565a83025f275473f6b1421/plone/app/contenttypes/browser/link_redirect_view.py#L114

display['meta'] should carry the path from the portal instead of obj.getPhysicalPath()[2:] which contains '/Plone/'. I've found this way to calculate it:

https://5.docs.plone.org/develop/plone/serving/traversing.html#getting-item-path-relative-to-the-site-root

yurj commented 3 days ago

see comment https://github.com/plone/plone.app.contenttypes/issues/710#issuecomment-2475943298