Closed euismod2336 closed 2 months ago
Yeah the algorithm is fine, the path and URL just needed to be normalized first.
Craft CMS 3:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-seomatic": "dev-develop as 3.5.4”,
Then do a composer clear-cache && composer update
…..
Craft CMS 4:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-seomatic": "dev-develop-v4 as 4.1.4”,
Then do a composer clear-cache && composer update
…..
Craft CMS 5:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-seomatic": "dev-develop-v5 as 5.1.4”,
Then do a composer clear-cache && composer update
Describe the bug
UrlHelper::mergeUrlWithPath removes too much when combining the parts back together again. Depending on your siteUrl it might strip different things. The TLD of your siteUrl is stripped of the beginning of the path. Related to https://github.com/nystudio107/craft-seomatic/issues/1376 This seems to only happen on the beginning of the path.
I thought about creating a PR but given there are several working solutions in the challenge, the point seemed moot :wink: https://www.craftcodingchallenge.com/challenge-14-testing-santas-patience/
To reproduce
Steps to reproduce the behaviour:
.com
commanding
ormodern
(or just overwrite the path value in the helper function)Expected behaviour
I would expect the resulting url to be [siteUrl]/commanding or [siteUrl]/modern and not [siteUrl]/manding and [siteUrl]/odern
Versions