Problem/Motivation

While downloading a Drupal 9 codebase using composer, found the following D8-specific documentation URL mentioned in the post-create-project step of the composer drupal/recommended-project template: https://www.drupal.org/docs/8/install

...
Next steps:
  * Install the site: https://www.drupal.org/docs/8/install
...

In that specific case, it would be better to replace that URL with https://www.drupal.org/docs/installing-drupal, which is a more generic version of those steps.

As mentioned by drumm, there are more of such URLs, in the Drupal 9.x codebase:
https://git.drupalcode.org/search?group_id=2&nav_source=navbar&project_i...
Found 7 occurrences of that URL in the following files, on the 9.3.x codebase:

composer/Template/LegacyProject/composer.json
composer/Template/RecommendedProject/composer.json
core/lib/Drupal/Core/DrupalKernel.php
core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php
core/modules/system/system.install
core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php

And that result is just for the 'docs/8/install' path.

(Searching for "docs/8/" in the 9.3.x branch, we get 100 results:
https://git.drupalcode.org/search?group_id=2&nav_source=navbar&project_i...

Probably we need to deal with those as well, in a separate issue).

Steps to reproduce

As mentioned here: https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins...,
use composer to create a fresh D9 codebase, with the following command:
composer create-project drupal/recommended-project my_site_name_dir

You will see the D8-specific URL in the post-create-project steps displayed at the end of the command output, as mentioned above.

You can also find the links by searching the codebase for the string 'docs/8/install'.
If on a Mac/Linux, you can use the following grep command after you 'cd' into the codebase folder:
grep -irn 'docs/8/install' ./

Proposed resolution

Find and replace all such URLs with more generic equivalents.

Issue fork drupal-3248078

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

antojose created an issue. See original summary.

antojose’s picture

Title: Replace D8-specific documentation URLs referenced in 9.x or higher version codebases, with corresponding major-version-specific or more generic documentation URL equivalents » Replace 8.x-specific documentation URLs referenced in 9.x or higher version codebases, with corresponding major-version-specific or more generic documentation URL equivalents
quietone’s picture

Adding related issue.

@antojose, can you provide a grep command for find the URLs to fix. and add it to the Steps to Reproduce? That will be needed for reviewers and others wanting to help out here. Thanks

quietone’s picture

Title: Replace 8.x-specific documentation URLs referenced in 9.x or higher version codebases, with corresponding major-version-specific or more generic documentation URL equivalents » Update 8.x specific documentation URLs
Issue summary: View changes

Does anyone mind a more succinct title?

antojose’s picture

Issue summary: View changes

@quietone, Updated the description with details on the grep command to be used.

antojose’s picture

I think I might have messed up the issue fork branch:
https://git.drupalcode.org/issue/drupal-3248078

Any way to delete and re-create the branch if that's the case?

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

rootwork’s picture

Issue tags: +Novice, +Portland2022

Tagging this as a Novice task for anyone who is able to search the codebase, whether with grep (as suggested) or any other method.

Task 1: Since it's been some time since this was last touched, some or all of these references may have been taken care of -- so the first step is to see if they are still present. If they are, provide an itemized list.

Task 2: Subsequently, the same person or a different person could then create a Merge Request addressing whatever items turn up in the first task.

uri_frazier’s picture

Issue tags: +GiftofOpenSource

Hello! I'm working on this issue at Portland DrupalCon 2022 during a "First Time Contributor Workshop".

alison’s picture

[mentoring] Working with Uri on this issue 👋

uri_frazier’s picture

Re-ran the grep command (grep -irn 'docs/8/install' ./) against 9.4.x codebase there are no new references that weren't taken care of in the commit by @antojose.

uri_frazier’s picture

Status: Active » Needs review

uri_frazier’s picture

Status: Needs review » Active

uri_frazier’s picture

Ran into some functional test errors (for merge request 2209) and realized it was because our fork was based off of 9.3.x and I needed to rebase /get changes from 9.4.x since that's what the tests were built for.
Had to rebase (2x), and hopefully all tests will pass now.

uri_frazier’s picture

Status: Active » Needs review
rootwork’s picture

Status: Needs review » Reviewed & tested by the community

Looks good! I can't say that I grepped the source to see if any 8.x links were missed since that was the point of the task, but assuming they were all included then I can confirm all the links are now correct.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

  • catch committed 2ba1d67 on 10.1.x
    Issue #3248078 by uri_frazier, antojose, alisonjo315, rootwork: Update 8...
  • catch committed c48ebd1 on 9.4.x
    Issue #3248078 by uri_frazier, antojose, alisonjo315, rootwork: Update 8...
  • catch committed e294365 on 9.5.x
    Issue #3248078 by uri_frazier, antojose, alisonjo315, rootwork: Update 8...
catch’s picture

Version: 9.5.x-dev » 9.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked back through to 9.4.x, thanks!

  • catch committed 78ac39a on 10.0.x
    Issue #3248078 by uri_frazier, antojose, alisonjo315, rootwork: Update 8...

  • xjm committed 4215ea1 on 9.4.x
    Revert "Issue #3248078 by uri_frazier, antojose, alisonjo315, rootwork:...
xjm’s picture

Version: 9.4.x-dev » 9.5.x-dev

I reverted this from 9.4.x because it breaks a couple of translatable strings, which should be a minor-only change. I think fixing redirects is not worth forcing translators to re-translate these strings in a bugfix release.

It will still be in 9.5.x and if we wanted we could backport the non-string-breaking changes to 9.4.x. Marking fixed for now, but if contributors would like to supply a docs-only patch for 9.4.x and set the issue to NR on 9.4.x for that, that would be OK too.

catch’s picture

Missed that that URL wasn't in a placeholder, so I've opened an issue to put it in one: #3295430: Change inline URLs to placeholders in interface text.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.