Problem/Motivation

Several links go to documentation for Drupal 7 instead of Drupal 8: for example, https://www.drupal.org/docs/7/install instead of https://www.drupal.org/docs/8/install.

Some links are redirected, and most have URL aliases as well as /node/... versions. The following table includes such variants.

Proposed resolution

Change the following links:

Old link New link
https://www.drupal.org/getting-started/install https://www.drupal.org/docs/8/install
https://www.drupal.org/docs/7/install https://www.drupal.org/docs/8/install
https://www.drupal.org/node/2764151 https://www.drupal.org/docs/8/install
https://www.drupal.org/getting-started/install-contrib https://www.drupal.org/docs/8/extending-drupal-8/overview
https://www.drupal.org/documentation/install/modules-themes https://www.drupal.org/docs/8/extending-drupal-8/overview
https://www.drupal.org/docs/7/extend/overview https://www.drupal.org/docs/8/extending-drupal-8/overview
https://www.drupal.org/node/176043 https://www.drupal.org/docs/8/extending-drupal-8/overview
https://www.drupal.org/documentation/install/multi-site https://www.drupal.org/docs/8/multisite
https://www.drupal.org/docs/7/multisite/multi-site-sharing-the-same-code... https://www.drupal.org/docs/8/multisite
https://www.drupal.org/node/251040 https://www.drupal.org/docs/8/multisite
https://www.drupal.org/getting-started/clean-urls https://www.drupal.org/docs/8/clean-urls-in-drupal-8
http://drupal.org/node/15365 https://www.drupal.org/docs/8/clean-urls-in-drupal-8
https://www.drupal.org/documentation/multilingual https://www.drupal.org/docs/8/multilingual
https://www.drupal.org/docs/7/system-requirements/php#csprng https://www.drupal.org/docs/8/system-requirements/php-requirements

The following searches should show which files contain any of these links:

$ grep -irl "getting-started/install" core
core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php
$ grep -irl "docs/7/install" core
$ grep -irl "node/2764151" core
$ grep -irl "documentation/install" core
core/INSTALL.txt
core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php
$ grep -irl "extend/overview" core
$ grep -irl "node/176043" core
$ grep -irl "docs/7/multisite" core
$ grep -irl "node/251040" core
$ grep -irl "getting-started/clean-urls" core
core/INSTALL.txt
$ grep -irl "documentation/multilingual" core
core/INSTALL.txt
$ grep -irl "node/15365" core
core/modules/system/system.install
$ grep -irl "docs/7/system-requirements/" core
core/modules/system/system.install

As noted in #37, we should not update this reference, so we should get the same results before and after applying the patch:

$ grep -irB 1 "docs/7/" core
core/themes/seven/README.txt-To read more about the Seven theme's origins (in Drupal 7) please see:
core/themes/seven/README.txt:https://www.drupal.org/docs/7/core/themes/seven

This issue is just about updating the links. Some of them are explicit strings, like <a href="https://www.drupal.org/getting-started/install">installation handbook</a>, and others are arguments to the t() function, like t('... <a href=":link">Enable clean URLs</a>', [':link' => 'http://drupal.org/node/15365']). Being more consistent is out of scope for this issue, and may be a mistake. See Comment #22 below.

It is OK to expand the scope of this issue if you find addtional links that need to be updated. Just be sure to update the table and search results above. Let's not try to update every link that needs to be updated as part of this issue.

Remaining tasks

User interface changes

String changes

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

monta created an issue. See original summary.

cebasqueira’s picture

Assigned: Unassigned » cebasqueira
cebasqueira’s picture

Status: Active » Needs review
FileSize
3.82 KB
faline’s picture

Assigned: cebasqueira » Unassigned
Status: Needs review » Reviewed & tested by the community

This is ok for me! The patch applies and also the urls are right.

cilefen’s picture

Priority: Minor » Normal
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update
Related issues: +#2830260: The update modules handbook help link points to the D7 page

We will close #2830260: The update modules handbook help link points to the D7 page and have one issue (this one) to fix all the bad handbook links.

cebasqueira’s picture

Assigned: Unassigned » cebasqueira
cebasqueira’s picture

Assigned: cebasqueira » Unassigned
Status: Needs work » Needs review
FileSize
6.78 KB
faline’s picture

Status: Needs review » Needs work

@cebasqueira there is one more that points to wrong url

core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php

I'm not sure if this one should also be changed.

monta’s picture

@faline
This should be changed also

cebasqueira’s picture

Patch updated!

faline’s picture

Status: Needs review » Reviewed & tested by the community

For me it is ok now

cilefen’s picture

Status: Reviewed & tested by the community » Needs work

This needs a title and summary update to reflect the current scope.

monta’s picture

Patch works fine

faline’s picture

Title: Mistake in the URL of the installation handbook in the install step » URL of the installation handbook in the install step and handbook help link points to the D7 page
Issue summary: View changes
faline’s picture

@cilefen I've update the summary and title, is this ok now?

thank you

faline’s picture

@cilefen I've update the summary and title, is this ok now?

thank you

monta’s picture

@faline it's OK

faline’s picture

Status: Needs work » Reviewed & tested by the community

So as the patch works fine, I'm put as RTBC

Dinesh18’s picture

patch worked for me as well.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: mistake_in_the_url_of-2830239-10.patch, failed testing.

cebasqueira’s picture

Status: Needs work » Reviewed & tested by the community
alexpott’s picture

Version: 8.2.x-dev » 8.3.x-dev
Issue summary: View changes
Issue tags: +String change in 8.3.0

We can only fix this in 8.3.0 because we shouldn't be changing translatable strings in patch releases. For example:

+++ b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php
@@ -188,7 +188,7 @@ protected function getDatabaseErrors(array $database, $settings_file) {
-        '#template' => '{% trans %}Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="https://www.drupal.org/getting-started/install">installation handbook</a>, or contact your hosting provider.{% endtrans%}{{ errors }}',
+        '#template' => '{% trans %}Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="https://www.drupal.org/docs/8/install">installation handbook</a>, or contact your hosting provider.{% endtrans%}{{ errors }}',

This will break all translations. We've started to put links in urls so people can internationalise the links and point to translated help. So this is correct rather the other links where we use a placeholder. Fixing such text is out-of-scope here though - please file a follow up it'd be good to get that done before 8.3.0 to minimise string change though :)

alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Status: Reviewed & tested by the community » Needs work

After applying the patch - looks like we should fix these here too - to be consistent everywhere:

grep -R "https://www.drupal.org/getting-started" ./core/
./core//INSTALL.txt:   https://www.drupal.org/getting-started/clean-urls to troubleshoot.
grep -R "http.://www.drupal.org/documentation/install" ./core/
./core//CHANGELOG.txt:    * See https://www.drupal.org/documentation/install/download#git
./core//INSTALL.txt:settings, consult https://www.drupal.org/documentation/install/multi-site

https://www.drupal.org/getting-started/clean-urls => https://www.drupal.org/docs/8/clean-urls-in-drupal-8
https://www.drupal.org/documentation/install/download#git => this is about composer... I guess https://www.drupal.org/docs/8/install/before-installation will take you to the right places... but maybe we need a nice URL for https://www.drupal.org/node/2404989
https://www.drupal.org/documentation/install/multi-site => https://www.drupal.org/docs/8/multisite-drupal

cilefen’s picture

See #12 as the issue changes.

monta’s picture

Title: URL of the installation handbook in the install step and handbook help link points to the D7 page » URLs of the installation handbook in the install step and help documentation points to the D7 links

I've updated the title again

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

benjifisher’s picture

Issue tags: -

I ran into one of these links when I tried installing Drupal with .htaccess missing. The warning message in the installer directed me to http://drupal.org/node/15365, the unaliased (and HTTP, insecure) URL for https://www.drupal.org/docs/7/configuring-clean-urls/enable-clean-urls. The link https://www.drupal.org/getting-started/clean-urls (Comment #25 above) redirects to the same page.

In addition to the searches in #25,

$ grep -R "node/15365" core
core/modules/system/system.install:        'description' => t('The minimum version of Apache needed to run Drupal without mod_rewrite enabled is 2.2.16. See the <a href=":link">enabling clean URLs</a> page for more information on mod_rewrite.', [':link' => 'http://drupal.org/node/15365']),
core/modules/system/system.install:        'description' => t('Your server is capable of using clean URLs, but it is not enabled. Using clean URLs gives an improved user experience and is recommended. <a href=":link">Enable clean URLs</a>', [':link' => 'http://drupal.org/node/15365']),

I will update the issue summary.

benjifisher’s picture

Title: URLs of the installation handbook in the install step and help documentation points to the D7 links » Several URLs point to Drupal 7 documentation pages instead of Drupal 8
Issue summary: View changes
Issue tags: -Needs issue summary update +Novice

Now that I have updated the summary, I think we can call this a Novice task, so I am adding that tag. Let's try to get this done!

As noted in #22, we cannot update translatable strings in a patch release. At this point, that means the earliest we can do this will be in Drupal 8.7.0.

th_tushar’s picture

Status: Needs work » Needs review
FileSize
7.71 KB

Attached patch updates URLs mentioned in issue description.

benjifisher’s picture

Status: Needs review » Needs work

@th_tushar: Thanks for working on this! Since the issue is marked "Novice", and you are a Technical Lead at your company, with 16 people listing you as a mentor on d.o, you could have coached someone else to work on this.

Somehow, your patch was mis-named: it ends in "-36.patch" but is attached to Comment #34. We do not have to fix it, but I want to mention it to avoid confusion.

Please also attach an interdiff, comparing your patch to the previous one. See https://www.drupal.org/documentation/git/interdiff if you need instructions.

I see that you noticed another link that needs to be updated: https://www.drupal.org/documentation/multilingual in INSTALL.txt. Good catch, but please note what the issue summary says about expanding scope. For documentation purposes, please add that link, the one it redirects to, and the unaliased path to the table in the issue description, and add corresponding grep searches (with the results on an unpatched version of 8.7.x).

spitzialist’s picture

Issue summary: View changes

Updated issue description (table and grep statement with results) as proposed in #35.

spitzialist’s picture

Status: Needs work » Needs review

Wanted to create interdiff but patch "mistake_in_the_url_of-2830239-10.patch" is not applicable to current branch of 8.7.x.

$ git apply mistake_in_the_url_of-2830239-10.patch
error: patch failed: core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php:175
error: core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php: patch does not apply
error: core/modules/system/src/Tests/Installer/InstallerTranslationTest.php: No such file or directory
error: patch failed: core/modules/update/update.manager.inc:99
error: core/modules/update/update.manager.inc: patch does not apply

Also online tools to create interdiff did not work.

I would propose to test the current patch without an interdiff.

spitzialist’s picture

Assigned: Unassigned » spitzialist
Issue summary: View changes
Status: Needs review » Needs work

Found another comment with mention of Drupal 7 docs:

I've updated the issue summary and will add the lines to the patch.

spitzialist’s picture

Assigned: spitzialist » Unassigned
Status: Needs work » Needs review
FileSize
8.08 KB
511 bytes

Added new patch and interdiff for link change mentioned in comment #38.

Additionally, another mention of Drupal 7 docs was found but this one is correct as it specifically mentions Drupal 7:

$ grep -irl "docs/7/" core
core/themes/seven/README.txt

To read more about the Seven theme's origins (in Drupal 7) please see:
https://www.drupal.org/docs/7/core/themes/seven

This should stay unchanged.

benjifisher’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Novice
Related issues: +#2855175: [META] Many documentation / handbook URLs redirect to D7 content

I noticed a related issue: #2855175: [META] Many documentation / handbook URLs redirect to D7 content. Curiously, it looks as though there is no overlap between the links found there and the ones found in this issue. Maybe I have to read it more closely.

@spitzialist, good point about the link for the history of the Seven theme. I added a note to the issue summary to check for this.

To review the patch, I did the following:

  • Run the grep commands from the issue summary, and check that the result is similar to what it shows in the summary. (I updated the summary where it was missing a couple of matches.)
  • Apply the patch.
  • Run the grep commands again. Check that nothing is found, except as noted above.
  • Open each of the links from the patch in a web browser to make sure that we are not introducing any broken links.

It all looks good to me, so I am marking the issue RTBC. I am also removing the Novice tag, since the novice tasks have already been done.

catch’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php
@@ -190,7 +190,7 @@ protected function getDatabaseErrors(array $database, $settings_file) {
+        '#template' => '{% trans %}Resolve all issues below to continue the installation. For help configuring your database server, see the <a href="https://www.drupal.org/docs/8/install">installation handbook</a>, or contact your hosting provider.{% endtrans%}{{ errors }}',

Since we're changing the string here, should we consider making it use <a href=":link" so that the next time the URL is updated, the translation won't need to?

benjifisher’s picture

Status: Needs review » Reviewed & tested by the community

@catch: I think that is the same change that @alexpott discussed in Comment #22:

This will break all translations. We've started to put links in urls so people can internationalise the links and point to translated help. So this is correct rather the other links where we use a placeholder. Fixing such text is out-of-scope here though ...

Based on that, I added this when I updated the issue summary:

This issue is just about updating the links. Some of them are explicit strings, like ..., and others are arguments to the t() function, like ... . Being more consistent is out of scope for this issue, and may be a mistake. See Comment #22 below.

Did I over-generalize?

I have not re-reviewed, but I think I have answered the question in #41, so I will move this issue back to RTBC.

catch’s picture

Status: Reviewed & tested by the community » Needs work

@benjifisher thanks that makes sense - however the patch also needs a re-roll.

benjifisher’s picture

Issue summary: View changes
Issue tags: +Novice, +Needs reroll

This looks like a pretty easy reroll, so I will add the Novice label and update the issue summary.

The conflict comes from #2856362: Drupal install fail on Percona XtraDB Cluster 5.7 (pxc_strict_mode enforced).

imalabya’s picture

Status: Needs work » Needs review
FileSize
8.38 KB

Added a rerolled patch.

Status: Needs review » Needs work

The last submitted patch, 45: urls-point-d7-docs-pages-2830239-45.patch, failed testing. View results

imalabya’s picture

Status: Needs work » Needs review
FileSize
8.1 KB
1.27 KB

Adding a new patch.

benjifisher’s picture

Issue tags: -Novice, -Needs reroll

@imalabya:

Since you are an experienced contributor, with several people who list you as a mentor, maybe next time you come across a Novice issue you can help someone less experienced to fix it.

Thanks for the updated patch. The only differences between your patch in #47 and the patch in #39 are

Based on my previous review, and the comparison I made when I added #45, I can move this issue back to RTBC.

benjifisher’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed b5ff72a and pushed to 8.7.x. Thanks!

  • catch committed b5ff72a on 8.7.x
    Issue #2830239 by cebasqueira, imalabya, spitzialist, th_tushar, monta,...
catch’s picture

Issue tags: +String change in 8.7.0
benjifisher’s picture

Thanks to all who helped on this issue! If you want to work on something similar, but more ambitious, have a look at #2855175: [META] Many documentation / handbook URLs redirect to D7 content.

Status: Fixed » Closed (fixed)

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

quietone’s picture

The proposed resolution states that http://drupal.org/node/15365 is to be changed to https://www.drupal.org/docs/8/clean-urls-in-drupal-8 but that did not happen. The link was changed but not the scheme.

There is an existing issue that identified the scheme, #3002983: Convert http links to https at system module