diff --git a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php index 360aae5d0c33c61b2bf0206d4e10d26e75a97ab2..61b25893f99d9b34fedcc679e4f13cfbb56042b6 100644 --- a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php +++ b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php @@ -161,14 +161,13 @@ public function getFeedEditObject($feed_url = NULL, array $values = []) { public function getDefaultFeedItemCount() { // Our tests are based off of rss.xml, so let's find out how many elements // should be related. - $feed_count = \Drupal::entityQuery('node') + return \Drupal::entityQuery('node') ->condition('promote', NodeInterface::PROMOTED) ->condition('status', NodeInterface::PUBLISHED) ->accessCheck(FALSE) - ->range(0, $this->config('system.rss')->get('items.limit')) + ->range(0, 10) ->count() ->execute(); - return min($feed_count, 10); } /** diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php index af664351a840d3d3fce7daf910e238e61b9ec02c..ae798fd1c3fd902ce03accec5d390d9589c63f46 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php @@ -502,8 +502,6 @@ public function testTranslateOperationInListUi() { $this->doSettingsPageTest('admin/config/system/site-information'); // Test the account settings page. $this->doSettingsPageTest('admin/config/people/accounts'); - // Test the RSS settings page. - $this->doSettingsPageTest('admin/config/services/rss-publishing'); } } diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php index 69afb28211820e5934c9992c55c67accbb71c67f..55da47b4efb46c50663326aff53a19dfd9bdc35c 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php @@ -888,11 +888,6 @@ public function testAlterInfo() { $this->container->get('state')->set('config_translation_test_config_translation_info_alter', TRUE); $this->container->get('plugin.manager.config_translation.mapper')->clearCachedDefinitions(); - // Check out if the translation page has the altered in settings. - $this->drupalGet('admin/config/system/site-information/translate/fr/add'); - $this->assertText('Feed channel'); - $this->assertText('Feed description'); - // Check if the translation page does not have the altered out settings. $this->drupalGet('admin/config/people/accounts/translate/fr/add'); $this->assertText('Name'); diff --git a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php index 6c9dc0115f0a403efe2118f1b0fcbb879fad2b7d..ffa970cc97a190037d25356997ff867984633a9a 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php @@ -469,7 +469,6 @@ public function testGetConfigData() { ], 'system.rss' => [ 'items' => [ - 'limit' => 10, 'view_mode' => 'rss', ], ], diff --git a/core/modules/system/config/install/system.rss.yml b/core/modules/system/config/install/system.rss.yml index 994f55cffb6a9db682a5e93ae5ba59b84dd407d5..bb7c0c040a97a1ab32cd5cd4e705d1c126520010 100644 --- a/core/modules/system/config/install/system.rss.yml +++ b/core/modules/system/config/install/system.rss.yml @@ -1,6 +1,2 @@ -channel: - description: '' items: - limit: 10 view_mode: rss -langcode: en diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml index e68bbae5a858e5df54e3dd45fc22920101535a7c..3a96ffecbe932a4d4c201c275524cce29d49ac6d 100644 --- a/core/modules/system/config/schema/system.schema.yml +++ b/core/modules/system/config/schema/system.schema.yml @@ -196,20 +196,10 @@ system.rss: type: config_object label: 'Feed settings' mapping: - channel: - type: mapping - label: 'Feed channel' - mapping: - description: - type: text - label: 'Feed description' items: type: mapping label: 'Feed items' mapping: - limit: - type: integer - label: 'Feed item limit' view_mode: type: string label: 'Feed content' diff --git a/core/modules/system/migrations/system_rss.yml b/core/modules/system/migrations/system_rss.yml index c6ac037bfcfb70245e2a1c59ac68c11e629750ec..8a74ac6c84cfaceaa21d69b4470d1b78d8c1ef21 100644 --- a/core/modules/system/migrations/system_rss.yml +++ b/core/modules/system/migrations/system_rss.yml @@ -7,11 +7,9 @@ migration_tags: source: plugin: variable variables: - - feed_default_items - feed_item_length source_module: system process: - 'items/limit': feed_default_items 'items/view_mode': feed_item_length destination: plugin: config diff --git a/core/modules/system/src/Form/RssFeedsForm.php b/core/modules/system/src/Form/RssFeedsForm.php index 95c7b42d665dc9499ccb9a833b681d1e8e30a9a6..bf323881a9267ede16fdcde9a651871fd3a2109d 100644 --- a/core/modules/system/src/Form/RssFeedsForm.php +++ b/core/modules/system/src/Form/RssFeedsForm.php @@ -30,25 +30,10 @@ protected function getEditableConfigNames() { * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { - $rss_config = $this->config('system.rss'); - $form['feed_description'] = [ - '#type' => 'textarea', - '#title' => t('Feed description'), - '#default_value' => $rss_config->get('channel.description'), - '#description' => t('Description of your site, included in each feed.'), - ]; - $options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30]; - $form['feed_default_items'] = [ - '#type' => 'select', - '#title' => t('Number of items in each feed'), - '#default_value' => $rss_config->get('items.limit'), - '#options' => array_combine($options, $options), - '#description' => t('Default number of items to include in each feed.'), - ]; $form['feed_view_mode'] = [ '#type' => 'select', '#title' => t('Feed content'), - '#default_value' => $rss_config->get('items.view_mode'), + '#default_value' => $this->config('system.rss')->get('items.view_mode'), '#options' => [ 'title' => t('Titles only'), 'teaser' => t('Titles plus teaser'), @@ -65,8 +50,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->config('system.rss') - ->set('channel.description', $form_state->getValue('feed_description')) - ->set('items.limit', $form_state->getValue('feed_default_items')) ->set('items.view_mode', $form_state->getValue('feed_view_mode')) ->save(); diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php index 803f362dac30b423f8230fa0d06d2f5dcebe184b..14391c15e9b33e2245a4b66c530f309b8e0cd451 100644 --- a/core/modules/system/system.post_update.php +++ b/core/modules/system/system.post_update.php @@ -168,3 +168,14 @@ function system_post_update_schema_version_int() { } } } + +/** + * Remove obsolete system.rss configuration. + */ +function system_post_update_delete_rss_settings() { + \Drupal::configFactory()->getEditable('system.rss') + ->clear('channel') + ->clear('items.limit') + ->clear('langcode') + ->save(); +} diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php index 77dba8e29b15d277f69dcb74822d107822aaddbf..7f1543393cc5f3260dfad632ae6e5f986e87d7cc 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php @@ -91,16 +91,9 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase { 'stale_file_threshold' => 2592000, ], 'system.rss' => [ - // channel is not handled by the migration. - 'channel' => [ - 'description' => '', - ], 'items' => [ - 'limit' => 10, 'view_mode' => 'title', ], - // langcode is not handled by the migration. - 'langcode' => 'en', ], 'system.site' => [ // uuid is not handled by the migration. diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php index f8d37e494c7dc185fac8d7f3ce15b6eb17782c5e..56953852c27b480cb4215ca11f5b219daf629f13 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php @@ -94,14 +94,9 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { 'stale_file_threshold' => 2592000, ], 'system.rss' => [ - 'channel' => [ - 'description' => '', - ], 'items' => [ - 'limit' => 27, 'view_mode' => 'fulltext', ], - 'langcode' => 'en', ], 'system.site' => [ // uuid is not handled by the migration.