- Issue created by @jurgenhaas
- @jurgenhaas opened merge request.
- Status changed to Needs review
over 1 year ago 1:56pm 25 July 2023 - Status changed to Needs work
over 1 year ago 6:21pm 26 August 2023 - 🇳🇴Norway eiriksm Norway
> In tests, though, the base path is being added correctly.
Is there any way we could come up with a failing test st least. Based on the description that sounds possible?
Could you write up steps to reproduce on a clean install?
- Status changed to Needs review
over 1 year ago 3:49pm 28 August 2023 - 🇩🇪Germany jurgenhaas Gottmadingen
I don't know if a failing test would be possible. What the MR does, is to set the base URL always as this:
$baseUrl = $this->request->getSchemeAndHttpHost() . $this->request->getBasePath();
The trailing
$this->request->getBasePath()
is missing so far. But the 2 test classesLinkcheckerLinkExtractorServiceTest
andLinkcheckerRepair301Test
have already defined the base path in the correct format including the trailing$this->request->getBasePath()
.In "normal" installations, that doesn't make any difference, as
$this->request->getBasePath()
is empty anyways. But if Drupal is installed in a sub-directory, so that you have to call the front-page ashttps://www.example.com/subpath
, i.e. the index.php is in that subdirectory and not in the web root, then/subpath
is what$this->request->getBasePath()
return. To make it even more clear, the URL for node 1 would then behttps://www.example.com/subpath/node/1
.As this scenario requires a webserver setup accordingly, I don't know if something like that could be covered by our test environment.