FIX Fluent now respects existing base URL prefixes in URL segment fields when no fluent domain exists #523
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fluent sets the URLSegment field's URLPrefix to be the base domain plus the parent page path including the current locale. When no fluent domains are configured, this defaulted to
Director::absoluteBaseURL()
. This was a bit heavy handed, since it doesn't consider any previous modifications toSiteTreeURLSegmentField::setURLPrefix()
(e.g. in subsites, where it sets the subsite domain).I've changed this to use the existing URL prefix instead.
There will still be conflicts if you use subsite domains and fluent domains at the same time, since they represent the same functionality, but that can be documented.
Fixes silverstripe/silverstripe-subsites#416