Issue #3414920 by quietone, m0d: Fix documentation redirects to Drupal 7 docs

(cherry picked from commit 01575cf9a8)
merge-requests/7413/head
Alex Pott 2024-04-06 13:09:03 +01:00
parent f9caeefc28
commit 38834ac7f6
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
17 changed files with 20 additions and 24 deletions

View File

@ -15,8 +15,6 @@ More about configuration:
See INSTALL.txt and UPDATE.txt in the "core" directory.
* Learn about how to use Drupal to create your site:
https://www.drupal.org/documentation
* Follow best practices:
https://www.drupal.org/best-practices
* Download contributed modules to /modules to extend Drupal's functionality:
https://www.drupal.org/project/project_module
* See also: "Developing for Drupal" for writing your own modules, below.

View File

@ -181,8 +181,8 @@ $databases = [];
*
* WARNING: The above defaults are designed for database portability. Changing
* them may cause unexpected behavior, including potential data loss. See
* https://www.drupal.org/developing/api/database/configuration for more
* information on these defaults and the potential issues.
* https://www.drupal.org/docs/8/api/database-api/database-configuration for
* more information on these defaults and the potential issues.
*
* More details can be found in the constructor methods for each driver:
* - \Drupal\mysql\Driver\Database\mysql\Connection::__construct()

View File

@ -53,5 +53,5 @@
*
* @see default.settings.php
* @see \Drupal\Core\DrupalKernel::getSitePath()
* @see https://www.drupal.org/documentation/install/multi-site
* @see https://www.drupal.org/docs/getting-started/multisite-drupal
*/

View File

@ -1555,9 +1555,7 @@
* Ideally, all code that is included in Drupal Core and contributed modules,
* themes, and distributions will be secure, internationalized, maintainable,
* and efficient. In order to facilitate this, the Drupal community has
* developed a set of guidelines and standards for developers to follow. Most of
* these standards can be found under
* @link https://www.drupal.org/developing/best-practices Best practices on Drupal.org @endlink
* developed a set of guidelines and standards for developers to follow.
*
* Standards and best practices that developers should be aware of include:
* - Security: https://www.drupal.org/writing-secure-code and the

View File

@ -29,7 +29,7 @@ use Drupal\Core\Database\Query\SelectInterface;
* mysqli or oci8.
*
* For more detailed information on the database abstraction layer, see
* https://www.drupal.org/docs/8/api/database-api/database-api-overview.
* https://www.drupal.org/docs/drupal-apis/database-api/database-api-overview.
*
* @section sec_entity Querying entities
* Any query on Drupal entities or fields should use the Entity Query API. See
@ -119,7 +119,7 @@ use Drupal\Core\Database\Query\SelectInterface;
*
* There are also methods to join to other tables, add fields with aliases,
* isNull() to query for NULL values, etc. See
* https://www.drupal.org/developing/api/database for many more details.
* https://www.drupal.org/docs/drupal-apis/database-api for many more details.
*
* One note on chaining: It is common in the dynamic database API to chain
* method calls (as illustrated here), because most of the query methods modify
@ -240,7 +240,7 @@ use Drupal\Core\Database\Query\SelectInterface;
* if you had a connection object variable $connection available to use. See
* also the @link container Services and Dependency Injection topic. @endlink
*
* @see https://www.drupal.org/developing/api/database
* @see https://www.drupal.org/docs/drupal-apis/database-api
* @see entity_api
* @see schemaapi
*

View File

@ -28,7 +28,7 @@ function content_translation_help($route_name, RouteMatchInterface $route_match)
case 'help.page.content_translation':
$output = '';
$output .= '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Content Translation module allows you to translate content, comments, content blocks, taxonomy terms, users and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a>. Together with the modules <a href=":language">Language</a>, <a href=":config-trans">Configuration Translation</a>, and <a href=":locale">Interface Translation</a>, it allows you to build multilingual websites. For more information, see the <a href=":translation-entity">online documentation for the Content Translation module</a>.', [':locale' => (\Drupal::moduleHandler()->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#', ':config-trans' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? Url::fromRoute('help.page', ['name' => 'config_translation'])->toString() : '#', ':language' => Url::fromRoute('help.page', ['name' => 'language'])->toString(), ':translation-entity' => 'https://www.drupal.org/documentation/modules/translation', ':field_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</p>';
$output .= '<p>' . t('The Content Translation module allows you to translate content, comments, content blocks, taxonomy terms, users and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a>. Together with the modules <a href=":language">Language</a>, <a href=":config-trans">Configuration Translation</a>, and <a href=":locale">Interface Translation</a>, it allows you to build multilingual websites. For more information, see the <a href=":translation-entity">online documentation for the Content Translation module</a>.', [':locale' => (\Drupal::moduleHandler()->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#', ':config-trans' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? Url::fromRoute('help.page', ['name' => 'config_translation'])->toString() : '#', ':language' => Url::fromRoute('help.page', ['name' => 'language'])->toString(), ':translation-entity' => 'https://www.drupal.org/docs/8/core/modules/content-translation', ':field_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</p>';
$output .= '<h2>' . t('Uses') . '</h2>';
$output .= '<dl>';
$output .= '<dt>' . t('Enabling translation') . '</dt>';

View File

@ -77,7 +77,7 @@ function contextual_help($route_name, RouteMatchInterface $route_match) {
case 'help.page.contextual':
$output = '';
$output .= '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Contextual links module gives users with the <em>Use contextual links</em> permission quick access to tasks associated with certain areas of pages on your site. For example, a menu displayed as a block has links to edit the menu and configure the block. For more information, see the <a href=":contextual">online documentation for the Contextual Links module</a>.', [':contextual' => 'https://www.drupal.org/documentation/modules/contextual']) . '</p>';
$output .= '<p>' . t('The Contextual links module gives users with the <em>Use contextual links</em> permission quick access to tasks associated with certain areas of pages on your site. For example, a menu displayed as a block has links to edit the menu and configure the block. For more information, see the <a href=":contextual">online documentation for the Contextual Links module</a>.', [':contextual' => 'https://www.drupal.org/docs/8/core/modules/contextual']) . '</p>';
$output .= '<h2>' . t('Uses') . '</h2>';
$output .= '<dl>';
$output .= '<dt>' . t('Displaying contextual links') . '</dt>';

View File

@ -26,7 +26,7 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) {
case 'help.page.field_ui':
$output = '';
$output .= '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Field UI module provides an administrative user interface (UI) for managing and displaying fields. Fields can be attached to most content entity sub-types. Different field types, widgets, and formatters are provided by the modules installed on your site, and managed by the Field module. For background information and terminology related to fields and entities, see the <a href=":field">Field module help page</a>. For more information about the Field UI, see the <a href=":field_ui_docs">online documentation for the Field UI module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui_docs' => 'https://www.drupal.org/documentation/modules/field-ui']) . '</p>';
$output .= '<p>' . t('The Field UI module provides an administrative user interface (UI) for managing and displaying fields. Fields can be attached to most content entity sub-types. Different field types, widgets, and formatters are provided by the modules installed on your site, and managed by the Field module. For background information and terminology related to fields and entities, see the <a href=":field">Field module help page</a>. For more information about the Field UI, see the <a href=":field_ui_docs">online documentation for the Field UI module</a>.', [':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString(), ':field_ui_docs' => 'https://www.drupal.org/docs/8/core/modules/field-ui']) . '</p>';
$output .= '<h2>' . t('Uses') . '</h2>';
$output .= '<dl>';
$output .= '<dt>' . t('Creating a field') . '</dt>';

View File

@ -30,7 +30,7 @@ function menu_ui_help($route_name, RouteMatchInterface $route_match) {
case 'help.page.menu_ui':
$output = '';
$output .= '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Menu UI module provides an interface for managing menus. A menu is a hierarchical collection of links, which can be within or external to the site, generally used for navigation. For more information, see the <a href=":menu">online documentation for the Menu UI module</a>.', [':menu' => 'https://www.drupal.org/documentation/modules/menu/']) . '</p>';
$output .= '<p>' . t('The Menu UI module provides an interface for managing menus. A menu is a hierarchical collection of links, which can be within or external to the site, generally used for navigation. For more information, see the <a href=":menu">online documentation for the Menu UI module</a>.', [':menu' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/menu-ui-module']) . '</p>';
$output .= '<h2>' . t('Uses') . '</h2>';
$output .= '<dl>';
$output .= '<dt>' . t('Managing menus') . '</dt>';

View File

@ -63,7 +63,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* For a complete example on migrating data from an SQL source, refer to
* https://www.drupal.org/docs/8/api/migrate-api/migrating-data-from-sql-source
*
* @see https://www.drupal.org/docs/8/api/database-api
* @see https://www.drupal.org/docs/drupal-apis/database-api
* @see \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
*/
abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPluginInterface, RequirementsInterface {

View File

@ -56,7 +56,7 @@ function node_help($route_name, RouteMatchInterface $route_match) {
case 'help.page.node':
$output = '';
$output .= '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the <a href=":field">Field module</a>). For more information, see the <a href=":node">online documentation for the Node module</a>.', [':node' => 'https://www.drupal.org/documentation/modules/node', ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</p>';
$output .= '<p>' . t('The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the <a href=":field">Field module</a>). For more information, see the <a href=":node">online documentation for the Node module</a>.', [':node' => 'https://www.drupal.org/docs/core-modules-and-themes/core-modules/node-module', ':field' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</p>';
$output .= '<h2>' . t('Uses') . '</h2>';
$output .= '<dl>';
$output .= '<dt>' . t('Creating content') . '</dt>';

View File

@ -21,7 +21,7 @@ function shortcut_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.shortcut':
$output = '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Shortcut module allows users to create sets of <em>shortcut</em> links to commonly-visited pages of the site. Shortcuts are contained within <em>sets</em>. Each user with <em>Select any shortcut set</em> permission can select a shortcut set created by anyone at the site. For more information, see the <a href=":shortcut">online documentation for the Shortcut module</a>.', [':shortcut' => 'https://www.drupal.org/documentation/modules/shortcut']) . '</p>';
$output .= '<p>' . t('The Shortcut module allows users to create sets of <em>shortcut</em> links to commonly-visited pages of the site. Shortcuts are contained within <em>sets</em>. Each user with <em>Select any shortcut set</em> permission can select a shortcut set created by anyone at the site. For more information, see the <a href=":shortcut">online documentation for the Shortcut module</a>.', [':shortcut' => 'https://www.drupal.org/docs/8/core/modules/shortcut']) . '</p>';
$output .= '<h2>' . t('Uses') . '</h2>';
$output .= '<dl><dt>' . t('Administering shortcuts') . '</dt>';
$output .= '<dd>' . t('Users with the <em>Administer shortcuts</em> permission can manage shortcut sets and edit the shortcuts within sets from the <a href=":shortcuts">Shortcuts administration page</a>.', [':shortcuts' => Url::fromRoute('entity.shortcut_set.collection')->toString()]) . '</dd>';

View File

@ -100,7 +100,7 @@ class NodeCounter extends DestinationBase implements ContainerFactoryPluginInter
->expression('totalcount', '[totalcount] + :totalcount', [':totalcount' => $totalcount])
// Per Drupal policy: "A query may have any number of placeholders, but
// all must have unique names even if they have the same value."
// https://www.drupal.org/docs/8/api/database-api/static-queries#placeholders
// https://www.drupal.org/docs/drupal-apis/database-api/static-queries#placeholders
->expression('timestamp', 'CASE WHEN [timestamp] > :timestamp1 THEN [timestamp] ELSE :timestamp2 END', [':timestamp1' => $timestamp, ':timestamp2' => $timestamp])
->execute();

View File

@ -23,7 +23,7 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) {
$output = '';
$output .= '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Taxonomy module allows users who have permission to create and edit content to categorize (tag) content of that type. Users who have the <em>Administer vocabularies and terms</em> <a href=":permissions" title="Taxonomy module permissions">permission</a> can add <em>vocabularies</em> that contain a set of related <em>terms</em>. The terms in a vocabulary can either be pre-set by an administrator or built gradually as content is added and edited. Terms may be organized hierarchically if desired.', [':permissions' => Url::fromRoute('user.admin_permissions.module', ['modules' => 'taxonomy'])->toString()]) . '</p>';
$output .= '<p>' . t('For more information, see the <a href=":taxonomy">online documentation for the Taxonomy module</a>.', [':taxonomy' => 'https://www.drupal.org/documentation/modules/taxonomy/']) . '</p>';
$output .= '<p>' . t('For more information, see the <a href=":taxonomy">online documentation for the Taxonomy module</a>.', [':taxonomy' => 'https://www.drupal.org/docs/8/core/modules/taxonomy']) . '</p>';
$output .= '<h2>' . t('Uses') . '</h2>';
$output .= '<dl>';
$output .= '<dt>' . t('Managing vocabularies') . '</dt>';

View File

@ -21,7 +21,7 @@ function toolbar_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.toolbar':
$output = '<h2>' . t('About') . '</h2>';
$output .= '<p>' . t('The Toolbar module provides a toolbar for site administrators, which displays tabs and trays provided by the Toolbar module itself and other modules. For more information, see the <a href=":toolbar_docs">online documentation for the Toolbar module</a>.', [':toolbar_docs' => 'https://www.drupal.org/documentation/modules/toolbar']) . '</p>';
$output .= '<p>' . t('The Toolbar module provides a toolbar for site administrators, which displays tabs and trays provided by the Toolbar module itself and other modules. For more information, see the <a href=":toolbar_docs">online documentation for the Toolbar module</a>.', [':toolbar_docs' => 'https://www.drupal.org/docs/8/core/modules/toolbar']) . '</p>';
$output .= '<h4>' . t('Terminology') . '</h4>';
$output .= '<dl>';
$output .= '<dt>' . t('Tabs') . '</dt>';

View File

@ -181,8 +181,8 @@ $databases = [];
*
* WARNING: The above defaults are designed for database portability. Changing
* them may cause unexpected behavior, including potential data loss. See
* https://www.drupal.org/developing/api/database/configuration for more
* information on these defaults and the potential issues.
* https://www.drupal.org/docs/8/api/database-api/database-configuration for
* more information on these defaults and the potential issues.
*
* More details can be found in the constructor methods for each driver:
* - \Drupal\mysql\Driver\Database\mysql\Connection::__construct()

View File

@ -53,5 +53,5 @@
*
* @see default.settings.php
* @see \Drupal\Core\DrupalKernel::getSitePath()
* @see https://www.drupal.org/documentation/install/multi-site
* @see https://www.drupal.org/docs/getting-started/multisite-drupal
*/