diff -u b/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module --- b/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -36,7 +36,7 @@ $output .= '
' . t('Configuring view and form modes') . '
'; $output .= '
' . t('You can add, edit, and delete view modes for entities on the View modes page, and you can add, edit, and delete form modes for entities on the Form modes page. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', [':view_modes' => Url::fromRoute('entity.entity_view_mode.collection')->toString(), ':form_modes' => Url::fromRoute('entity.entity_form_mode.collection')->toString()]) . '
'; $output .= '
' . t('Listing fields') . '
'; - $output .= '
' . t('There are two reports available that list the fields defined on your site. The Used in entities report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the Views and Views UI modules are enabled, the Used in views report lists each field that is used in a view, with a link to edit that view.', [':entity-list' => \Drupal::url('entity.field_storage_config.collection'), ':views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', ':views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', ['name' => 'views']) : '#', ':views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', ['name' => 'views_ui']) : '#']) . '
'; + $output .= '
' . t('There are two reports available that list the fields defined on your site. The Used in entities report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the Views and Views UI modules are enabled, the Used in views report lists each field that is used in a view, with a link to edit that view.', [':entity-list' => \Drupal::url('entity.field_storage_config.collection'), ':views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', ':views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', ['name' => 'views']) : '#', ':views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', ['name' => 'views_ui'->toString()]) : '#'->toString()]) . '
'; $output .= ''; return $output; @@ -225,7 +225,7 @@ * - elements: An associative array containing a Form API structure to be * rendered as a table. */ -function template_preprocess_field_ui_table(&$variables) { +function template_preprocess_field_ui_table(array &$variables) { template_preprocess_table($variables); } diff -u b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php --- b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -674,7 +674,7 @@ * {@inheritdoc} */ public function usesLinkDisplay() { - return TRUE; + return !$this->hasPath(); } /** @@ -683,7 +683,7 @@ * {@inheritdoc} */ public function usesLinkDisplay() { - return !$this->hasPath(); + return TRUE; } /** @@ -2128,7 +2128,7 @@ // Return the display URL if there is no custom url. if ($this->getOption('link_display') !== 'custom_url' || empty($path)) { - return $this->view->getUrl(NULL, $this->getLinkDisplay()); + return $this->view->getUrl(NULL, $this->display['id']); } $parts = UrlHelper::parse($path); @@ -2137,7 +2137,7 @@ // Return the display URL if there is no custom url. if ($this->getOption('link_display') !== 'custom_url' || empty($path)) { - return $this->view->getUrl(NULL, $this->display['id']); + return $this->view->getUrl(NULL, $this->getLinkDisplay()); } $parts = UrlHelper::parse($path); interdiff impossible; taking evasive action reverted: --- b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php +++ a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php @@ -216,18 +216,6 @@ $result = $this->xpath('//div[@class=:class]/a', [':class' => 'more-link']); $this->assertEmpty($result, 'The more link is not shown when view has more records.'); - // Test if page can have custom more link. - $view->display_handler->setOption('use_more', 1); - $view->display_handler->setOption('use_more_always', 1); - $view->display_handler->setOption('link_display', 'custom_url'); - $view->display_handler->setOption('link_url', '/custom-link'); - $this->executeView($view); - $output = $view->preview(); - $output = $renderer->renderRoot($output); - $this->setRawContent($output); - $result = $this->xpath('//div[@class=:class]/a[@href=:href]', [':class' => 'more-link', ':href' => '/custom-link']); - $this->assertFalse(empty($result), 'Custom more link is shown.'); - // Test the default value of use_more_always. $view = View::create()->getExecutable(); $this->assertTrue($view->getDisplay()->getOption('use_more_always'), 'Always display the more link by default.'); unchanged: --- a/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php @@ -223,6 +223,18 @@ public function testReadMore() { $result = $this->xpath('//div[@class=:class]/a', [':class' => 'more-link']); $this->assertEmpty($result, 'The more link is not shown when view has more records.'); + // Test if page can have custom more link. + $view->display_handler->setOption('use_more', 1); + $view->display_handler->setOption('use_more_always', 1); + $view->display_handler->setOption('link_display', 'custom_url'); + $view->display_handler->setOption('link_url', '/custom-link'); + $this->executeView($view); + $output = $view->preview(); + $output = $renderer->renderRoot($output); + $this->setRawContent($output); + $result = $this->xpath('//div[@class=:class]/a[@href=:href]', [':class' => 'more-link', ':href' => '/custom-link']); + $this->assertFalse(empty($result), 'Custom more link is shown.'); + // Test the default value of use_more_always. $view = View::create()->getExecutable(); $this->assertTrue($view->getDisplay()->getOption('use_more_always'), 'Always display the more link by default.'); diff -u b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php --- b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php +++ b/core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php @@ -32,7 +32,7 @@ */ public function testReportFields() { $this->drupalGet('admin/structure/fields/views-fields'); - $this->assertRaw('Fields used in views', 'Title appears correctly'); + $this->assertSession('Fields used in views', 'Title appears correctly'); $this->assertSession()->pageTextContains('No fields have been used in views yet.'); // Set up the field_test field. @@ -54,7 +54,7 @@ $this->drupalGet('admin/structure/fields/views-fields'); $this->assertSession()->responseContains('field_test'); $this->assertSession()->responseContains('>test_field_field_test'); - $this->assertRaw('Fields used in views', 'Title appears correctly'); + $this->assertSession('Fields used in views', 'Title appears correctly'); } }