Privacy policy links incorrect when Drupal is installed in a subdirectory

Created on 2 March 2022, over 2 years ago
Updated 22 May 2023, over 1 year ago

Problem/Motivation

When Drupal is installed in a subdirectory, the subdirectory is duplicated in the privacy policy link.

For example, a site installed at https://example.com/drupal and a privacy policy at https://example.com/drupal/privacy will generate a link like https://example.com/drupal/drupal/privacy

Steps to reproduce

Install module on a Drupal site setup in a subdirectory, and configure a node for the privacy policy.

Proposed resolution

Policy URL is created by combining the $base_url with a link generated from Link::createFromRoute() which both include the subdirectory path. Instead we should pass the option to generate an absolute link straight from createFromRoute().

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.4

Component

Code

Created by

🇬🇧United Kingdom PJnes

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024