Created on 3 March 2008, almost 17 years ago
Updated 25 April 2023, over 1 year ago

What is the problem to solve?

Pathauto is used on almost 75% of all Drupal sites โ†’ , and is essential for SEO-and-user-friendly URLs. It would be good to get it into Drupal Core if possible.

Who is this for?

  • Content authors
  • Site builders
  • Site owners

Result: what will be the outcome?

  • Site builders will no longer need to install an extra "top 5" module on the majority of their sites.
  • Drupal will ship with better SEO out of the box, which is important to site owners.
  • Content authors will save time in creating content because paths will be figured out automatically.

How can we know the desired result is achieved?

Pathauto module and Token no longer needs to be maintained in contrib for Drupal 8.

Problem/Motivation

Use cases:

  • URLs like node/8765 are unintuitive and provide no meaningful context. Core's Path module lets you create aliases, while Pathauto automatically creates SEO-friendly aliases based on token patterns.
  • A typical pattern for pages is /[node:title], and for other content types, /[node:type]/[node:title] (e.g. /article/how-to-program; /project/drupal.
  • Blog articles: people often want the year or some other date component in the URL, such as /blog/[date:YYYY]/[node:title].
  • Users and taxonomy terms: /user/[user:name] and [taxonomy:vocabulary]/[taxonomy:term-name].

These use cases cover most sites' needs.

Proposed resolution

Add the ability to have URL alias patterns to Drupal Core.

Remaining tasks

Here is what would need to be done to get Pathauto into core, along with some notes about when each item is needed (before the API/Feature freeze, or can it wait for clean-up phase):

User interface changes

New UI for assigning automatic URL aliases to entity paths. New UI for tokens. Field for URL aliases for entities.

API changes

Some new tokens would be introduced (see Remaining tasks). No changes to existing APIs.

Related issues

#1726734: Replace serial entity IDs with UUIDs in URLs, or even globally? โ†’

โœจ Feature request
Status

Needs work

Component

Proposed Plan

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States sparkguitar05

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.

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    Reviewed with @Gรกbor Hojtsy. The status is still the same as after #92; next step is to create a plan on how to make this happen.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dww

    Should we start a new META in the core queue (not ideas) to be the implementation plan?

    Sounds like โœจ Add a UI for browsing tokens Needs work is the key blocker? That'll be useful without pathauto, too, and will be a huge effort on its own.

    Are there any other obvious other steps that will need their own issues, or is it pretty "simple" [sic] after the token browser is in? ๐Ÿ˜…

    Is creating the plan issue and fleshing it out enough to call this "proposed plan" fixed?

    Thanks!
    -Derek

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    See #91, that's mostly still true, there is is only one change since then and that is that entity bundle conditions got into core and pathauto was able to remove the dependency on the ctools module.

    My opinion of #91 is also unchanged. The token API has been at a standstill for a decade in core at this point. Getting token UI, field/menu/... tokens into core would absolutely be useful and I'm +1 on that. Pathauto I'm unsure. There are fairly large and complex issues in the queue about supporting other routes, sub-paths, pattern fallbacks.. I would assume that getting it into core would require a lot of tedious architecture discussions. Lets talk again when/if most of token.module is in core.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dww

    Thanks for the input! Makes sense. I remember reading somewhere that "@Berdir is always right". ๐Ÿ˜‰

    In that case, do we need a full meta plan for "Token UI in core" as the next step? Or is that the entire scope of โœจ Add a UI for browsing tokens Needs work already?

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    There are some long-standing token core issues like โœจ Add support for typed data selection Needs work and #2164635: Automatically expose typed data to token API โ†’ which are probably orthogonal to token browser but would help consolidate/modernise the token API in general.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dww

    Reading #87 I wonder if we (also?) need a meta plan for moving the non-UI parts of Token Module into core (e.g. the "advanced tokens", etc). Does such a meta already exist? If not, would it be helpful to start one?

    Thanks,
    -Derek

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States DamienMcKenna NH, USA

    Might it be worth having a separate issue for #87, as dww suggested, separate to whatever is done in the other two architecture issues?

Production build 0.71.5 2024