Path field prefix on sites which are not at the root of the domain is incorrect

Created on 31 July 2024, 5 months ago
Updated 1 August 2024, 5 months ago

Problem/Motivation

If a site is deployed as a subdirectory such as example.com/my-drupal-site, the Path field will be incorrectly prefixed with https://example.com/ instead of the correct https://example.com/my-drupal-site/.

Steps to reproduce

Deploy a Drupal site in a subdirectory (not at the root of the domain) and create or edit a URL redirect entity.

Proposed resolution

In RedirectSourceWidget.php, replace \Drupal::request()->getSchemeAndHttpHost() . '/' with Url::fromUri('internal:/', ['absolute' => TRUE]) or \Drupal::service('router.request_context')->getCompleteBaseUrl() . '/'

πŸ› Bug report
Status

Needs review

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States timurtripp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024