Don't use base_path() in URL placeholder values

Created on 21 September 2015, over 9 years ago
Updated 29 May 2025, 2 days ago

Follow-up to #2570355: Replace remaining !placeholder and @placeholder with :placeholder for URLs β†’

Problem/Motivation

We do things such as:

'description' => t('The installer requires that you create a translations directory as part of the installation process. Create the directory %translations_directory . More details about installing Drupal are available in INSTALL.txt.', array('%translations_directory' => $translations_directory, ':install_txt' => base_path() . 'core/INSTALL.txt')),

+ 'description' => t('The installer requires to contact the translation server to download a translation file. Check your internet connection and verify that your website can reach the translation server at !server_url.', array(':server_url' => $server_url, '!server_url' => $server_url)),

+ ':update-url' => $GLOBALS['base_path'] . 'update.php'

Proposed resolution

use Url::fromUri where possible

Remaining tasks

identify all the places where we do this
convert
review
commit

User interface changes

N/A

API changes

N/A

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

other

Created by

πŸ‡³πŸ‡±Netherlands stefan.r

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024