Skip to content
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

Merged
merged 6 commits into from
Nov 18, 2024
Merged

Update utils.py #711

merged 6 commits into from
Nov 18, 2024

Conversation

yurj
Copy link
Contributor

@yurj yurj commented Nov 14, 2024

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

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
@mister-roboto
Copy link

@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:

@jenkins-plone-org please run jobs

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!

yurj added 2 commits November 14, 2024 13:20
Use absolute_url_path so it works well with VHM virtual paths and /PloneSiteID sites
@yurj
Copy link
Contributor Author

yurj commented Nov 14, 2024

@jenkins-plone-org please run jobs

yurj added 2 commits November 14, 2024 14:59
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
@yurj
Copy link
Contributor Author

yurj commented Nov 14, 2024

@jenkins-plone-org please run jobs

@yurj
Copy link
Contributor Author

yurj commented Nov 14, 2024

pre-commit.ci autofix

@yurj
Copy link
Contributor Author

yurj commented Nov 14, 2024

@jenkins-plone-org please run jobs

@yurj
Copy link
Contributor Author

yurj commented Nov 15, 2024

@1letter @petschki can I merge? I also notified to plone.restapi repo via issue for the Link serializer.

@1letter
Copy link
Contributor

1letter commented Nov 15, 2024

@yurj i can test and review your changes on monday, i'm on the way to a short holiday trip.

Copy link
Contributor

@1letter 1letter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@yurj yurj merged commit db05318 into master Nov 18, 2024
12 checks passed
@yurj yurj deleted the yurj-fix-relative-path branch November 18, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants