Closed plumduffer closed 2 years ago
What's the value for your site's "Base URL" setting? I don't think that's the issue, but worth checking.
If the $currentUrl
is showing that, then there's likely something wrong with $request->absoluteUrl
- can you try printing that?
In the meantime, I'll spin up a DDEV install, just to double check. But I wouldn't have thought that to be a factor.
The Base URL is set to the PRIMARY_SITE_URL environment variable which is PRIMARY_SITE_URL=https://mysite.ddev.site:3000/
And printing $request->absoluteUrl
gives me this
//mysite.ddev.site:3000/
Okay, it looks like this might not be directly related to this plugin. The reason I am running on port 3000 is for browsersync, but if I don't use browsersync, it works as expected.
Ah, that's interesting, it's still strange that the protocol is being stripped off though. Might be worth a chat to the Craft team about this, and whether it's a bug or not.
Closing for now, happy to re-open if this is our issue, but seems strange behaviour in Craft itself with absoluteUrl
.
Describe the bug
I have an issue where active states are not working on my local DDEV environment.
It looks like this line is always returning false for DDEV environments. => https://github.com/verbb/navigation/blob/craft-4/src/elements/Node.php#L927
I figured this out because I threw in the following line just before it, and it produced the array in the screenshot below.
Steps to reproduce
Craft CMS version
4.2.3
Plugin version
2.0.5
Multi-site?
No
Additional context
No response