-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update utils.py #711
Update utils.py #711
Conversation
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
@yurj thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
Use absolute_url_path so it works well with VHM virtual paths and /PloneSiteID sites
news
@jenkins-plone-org please run jobs |
absolute_url_path() already return a leading '/'
if path is '/' (didn't happen with getPhysicalPath), avoid that ${navigation_root_url}/sitemap is transformed to //sitemap
@jenkins-plone-org please run jobs |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
@jenkins-plone-org please run jobs |
@yurj i can test and review your changes on monday, i'm on the way to a short holiday trip. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks!
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