url_is_external() should be called url_is_absolute() and _external_url_is_local() should be called _absolute_url_is_local()

Created on 27 January 2013, almost 12 years ago
Updated 16 January 2025, 5 days ago

The idea of "externality" to a Drupal site is rather muddled currently. A Drupal site installed at http://example.com will treat the url "http://example.com" as "external" when checked with url_is_external(). The function _external_url_is_local() comes from here #736172: drupal_goto() should allow absolute destinations that are within the same site β†’ and appears in the documentation for Drupal 8 http://api.drupal.org/api/drupal/core%21includes%21common.inc/function/_....

Really, how can something "external" ever be "local", semantically speaking?

Currently "local" means "is this Drupal site" and "internal" means "relative path recognisable by the menu system", "external" means "absolute path" and there is no opposite of local, just "not local".

I think the easiest way to make sense of it all is just to call "external" "absolute" instead as that still clearly differentiates from the alternative which is "relative Drupal path" but doesn't allow the user to get it confused with something else.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡¦πŸ‡ΊAustralia thedavidmeister

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.

  • πŸ‡ΊπŸ‡Έ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 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