What happened?
The commit 8e69802 addressed constructing URLs for console requests if the @web alias wasn’t explicitly defined. Should a similar change not also be applied to CP console requests to ensure that CP URLs are output as absolute URLs?
Steps to reproduce
- In a custom module, create a console command that outputs an entry’s CP edit URL.
die(\craft\helpers\UrlHelper::cpUrl());
Expected behavior
The output should be https://projectpath.ddev.site/admin.
Actual behavior
The output is /admin.
Tested in Craft 5 but this likely affects Craft 4 as well.
Craft CMS version
5.2.7
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
The commit 8e69802 addressed constructing URLs for console requests if the
@webalias wasn’t explicitly defined. Should a similar change not also be applied to CP console requests to ensure that CP URLs are output as absolute URLs?Steps to reproduce
Expected behavior
The output should be
https://projectpath.ddev.site/admin.Actual behavior
The output is
/admin.Tested in Craft 5 but this likely affects Craft 4 as well.
Craft CMS version
5.2.7
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions