Remove Drupal 8.9.x and Drupal 9.5.x from api.drupal.org and redirect to 10.3.x or 11.x

Created on 11 June 2024, 17 days ago
Updated 12 June 2024, 16 days ago

Problem/Motivation

When you visit api.drupal.org, you get a list of Drupal versions that includes 11.x, 10.3.x, 9.5.x and 8.9.x

While there are still sites on 9.5.x and 8.9.x, no-on should be developing new code for them, so they should not be listed on the API documentation - it makes it look as if it's not being kept up to date.

This also results in google results showing information for old versions, and there's often not a way to browse from say 9.2.x to 10.3.x

.e.g. https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21me... - how do I get to the 10.3.x version of the documentation from there?

Steps to reproduce

Proposed resolution

Only list supported versions on the api.drupal.org front page and redirect older links to the latest version.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Comments & Activities

  • Issue created by @catch
  • πŸ‡³πŸ‡΄Norway hansfn

    No, we should list older versions and redirecting isn't very user-friendly if you need to read the old docs.

    We need to fix the issue with bad search results in another way. We probably need to use "current" or something.

    By the way, this is the docs list from our friends at Symfony:

    Could we ask them what they have done? It doesn't seem to be robots-related - neither robots.txt or robots header explains this:

    Google search: intitle:"The HttpKernel+Component" site:symfony.com

  • πŸ‡¬πŸ‡§United Kingdom catch

    rel="canonical" should probably help with the search results, and could point to '11.x' until we rename it to 'main', then we'd have to update to point there instead. Not sure if that would be a feature request to api.drupal.org or a d.o-specific custom module.

    No, we should list older versions

    At the moment we list 8.9.x, which is unsupported for a very long time now, but not 10.2.x which is the current recommended release, or 10.1.x which still has security coverage (not for long).

    I would not mind if older branches were listed in a drop-down similar to Symfony's, but at the moment they're top level menu items.

  • πŸ‡³πŸ‡΄Norway hansfn

    Yeah, I missed canonical. It seems to explain the decent search results for Symfony.

    The bad search results are more serious when moving between versions is hard.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    I like how QGIS solves this by adding a prominently red fixed bar at the top, linking to the latest version:

    This documentation is for a QGIS version which has reached end of life. Instead visit the latest version.

    Example from old version 3.16 https://docs.qgis.org/3.16/en/docs/user_manual/print_composer/composer_i...

    "latest version" links to https://docs.qgis.org/3.34/en/docs/user_manual/print_composer/composer_i...

  • πŸ‡ΊπŸ‡ΈUnited States drumm NY, US

    I do think we should keep some old versions. If you end up with an old site, or old memory, it is useful to see old documentation, to help track down what has changed.

Production build 0.69.0 2024