From 01575cf9a82ac57e58ec3a44e4e1157b52fd95c6 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sat, 6 Apr 2024 13:09:03 +0100 Subject: [PATCH] Issue #3414920 by quietone, m0d: Fix documentation redirects to Drupal 7 docs --- core/USAGE.txt | 2 -- core/assets/scaffold/files/default.settings.php | 4 ++-- core/assets/scaffold/files/example.sites.php | 2 +- core/core.api.php | 4 +--- core/lib/Drupal/Core/Database/database.api.php | 6 +++--- core/modules/content_translation/content_translation.module | 2 +- core/modules/contextual/contextual.module | 2 +- core/modules/field_ui/field_ui.module | 2 +- core/modules/menu_ui/menu_ui.module | 2 +- core/modules/migrate/src/Plugin/migrate/source/SqlBase.php | 2 +- core/modules/node/node.module | 2 +- core/modules/shortcut/shortcut.module | 2 +- .../src/Plugin/migrate/destination/NodeCounter.php | 2 +- core/modules/taxonomy/taxonomy.module | 2 +- core/modules/toolbar/toolbar.module | 2 +- sites/default/default.settings.php | 4 ++-- sites/example.sites.php | 2 +- 17 files changed, 20 insertions(+), 24 deletions(-) diff --git a/core/USAGE.txt b/core/USAGE.txt index 9b772874f35d..f9bfea503b9d 100644 --- a/core/USAGE.txt +++ b/core/USAGE.txt @@ -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. diff --git a/core/assets/scaffold/files/default.settings.php b/core/assets/scaffold/files/default.settings.php index 71da3e6f821c..264597b163ba 100644 --- a/core/assets/scaffold/files/default.settings.php +++ b/core/assets/scaffold/files/default.settings.php @@ -181,8 +181,8 @@ * * 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() diff --git a/core/assets/scaffold/files/example.sites.php b/core/assets/scaffold/files/example.sites.php index 35995136d3fe..a1955a9db80f 100644 --- a/core/assets/scaffold/files/example.sites.php +++ b/core/assets/scaffold/files/example.sites.php @@ -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 */ diff --git a/core/core.api.php b/core/core.api.php index 4b64616e7201..d8ec625f7b97 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -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 diff --git a/core/lib/Drupal/Core/Database/database.api.php b/core/lib/Drupal/Core/Database/database.api.php index 28b8e42b299c..c713d1a62374 100644 --- a/core/lib/Drupal/Core/Database/database.api.php +++ b/core/lib/Drupal/Core/Database/database.api.php @@ -29,7 +29,7 @@ * 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 @@ * * 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 @@ * 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 * diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index b4b995501477..eba279690f06 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -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>'; diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index 185c8cde6eb3..d57ca6c17818 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -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>'; diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index 36570a4b6a11..421347b8311f 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -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>'; diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index 7bdc3136605a..11b1f993e31a 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -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>'; diff --git a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php index 57f483e8407f..022a94e37445 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -63,7 +63,7 @@ * 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 { diff --git a/core/modules/node/node.module b/core/modules/node/node.module index ed5e881e760e..c32ab74fcc6e 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -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>'; diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index c6bcab315f14..a4ff0352e24d 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -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>'; diff --git a/core/modules/statistics/src/Plugin/migrate/destination/NodeCounter.php b/core/modules/statistics/src/Plugin/migrate/destination/NodeCounter.php index 80149345a71d..53fd561e5d8d 100644 --- a/core/modules/statistics/src/Plugin/migrate/destination/NodeCounter.php +++ b/core/modules/statistics/src/Plugin/migrate/destination/NodeCounter.php @@ -100,7 +100,7 @@ public function import(Row $row, array $old_destination_id_values = []) { ->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(); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 787263ca20a6..b2297302aa01 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -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>'; diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 72edbe8d2eaf..ff395da0fcfc 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -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>'; diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 71da3e6f821c..264597b163ba 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -181,8 +181,8 @@ * * 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() diff --git a/sites/example.sites.php b/sites/example.sites.php index 35995136d3fe..a1955a9db80f 100644 --- a/sites/example.sites.php +++ b/sites/example.sites.php @@ -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 */ -- GitLab