Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
This works with every combination of VHM (including _vh_, using mysite.com/Plone/ as public address) and with navigation root. This is a minimal change that fix the relative path. This function is used in https://github.com/plone/plone.restapi/blob/main/src/plone/restapi/serializer/dxfields.py too

For the discussion, see #710
  • Loading branch information
yurj authored Nov 14, 2024
1 parent 450888e commit 151aac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plone/app/contenttypes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def replace_link_variables_by_paths(context, url):


def _replace_variable_by_path(url, variable, obj):
path = "/".join(obj.getPhysicalPath())
path = obj.absolute_url_path()
return url.replace(variable, path)


Expand Down

0 comments on commit 151aac3

Please sign in to comment.