From e4df5b7e8f4431bfebd0e1887027ea7f5df69e75 Mon Sep 17 00:00:00 2001 From: tuutti Date: Fri, 26 May 2023 13:42:39 +0300 Subject: [PATCH 01/17] UHF-8525: Flush external caches when global announcement is modified/updated or created --- .../custom/helfi_etusivu/helfi_etusivu.module | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/public/modules/custom/helfi_etusivu/helfi_etusivu.module b/public/modules/custom/helfi_etusivu/helfi_etusivu.module index 332aeb285..12d376388 100644 --- a/public/modules/custom/helfi_etusivu/helfi_etusivu.module +++ b/public/modules/custom/helfi_etusivu/helfi_etusivu.module @@ -7,6 +7,8 @@ declare(strict_types = 1); +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Render\BubbleableMetadata; @@ -171,3 +173,51 @@ function helfi_etusivu_block_alter(&$definitions) { } } } + +/** + * Invalidate external caches. + * + * This is used to automatically flush caches on all external sites when + * 'announcement' node marked as 'publish externally' is created/modified + * or deleted. + * + * @param \Drupal\Core\Entity\EntityInterface $entity + * The entity to flush cache tags for. + */ +function helfi_etusivu_invalidate_external_caches(EntityInterface $entity) : void { + if (!$entity instanceof ContentEntityInterface) { + return; + } + // Only flush caches when we're saving announcement node with + // 'field_publish_externally' option checked. + $isAnnouncementNode = $entity->getEntityTypeId() === 'node' && $entity->bundle() === 'announcement'; + $publishExternally = $entity->hasField('field_publish_externally') && (bool) $entity->get('field_publish_externally')->value === TRUE; + + if (!$isAnnouncementNode || !$publishExternally) { + return; + } + /** @var \Drupal\helfi_api_base\Cache\CacheTagInvalidator $service */ + $service = \Drupal::service('helfi_api_base.cache_tag_invalidator'); + $service->invalidateTags(['helfi_external_entity_announcement']); +} + +/** + * Implements hook_entity_update(). + */ +function helfi_etusivu_entity_update(EntityInterface $entity) : void { + helfi_etusivu_invalidate_external_caches($entity); +} + +/** + * Implements hook_entity_delete(). + */ +function helfi_etusivu_entity_delete(EntityInterface $entity) : void { + helfi_etusivu_invalidate_external_caches($entity); +} + +/** + * Implements hook_entity_insert(). + */ +function helfi_etusivu_entity_insert(EntityInterface $entity) : void { + helfi_etusivu_invalidate_external_caches($entity); +} From 7e047b9055d0037668b16b26f5eb1a1186c678e4 Mon Sep 17 00:00:00 2001 From: tuutti Date: Mon, 29 May 2023 07:08:43 +0300 Subject: [PATCH 02/17] UHF-8525: added comment --- public/modules/custom/helfi_etusivu/helfi_etusivu.module | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/modules/custom/helfi_etusivu/helfi_etusivu.module b/public/modules/custom/helfi_etusivu/helfi_etusivu.module index 12d376388..ee4298fe3 100644 --- a/public/modules/custom/helfi_etusivu/helfi_etusivu.module +++ b/public/modules/custom/helfi_etusivu/helfi_etusivu.module @@ -166,7 +166,7 @@ function helfi_etusivu_preprocess_toolbar(&$variables): void { /** * Implements hook_block_alter(). */ -function helfi_etusivu_block_alter(&$definitions) { +function helfi_etusivu_block_alter(&$definitions) : void { foreach ($definitions as $id => $definition) { if ($id === 'local_tasks_block') { $definitions[$id]['class'] = 'Drupal\helfi_etusivu\Plugin\Block\EtusivuLocalTasksBlock'; @@ -178,9 +178,14 @@ function helfi_etusivu_block_alter(&$definitions) { * Invalidate external caches. * * This is used to automatically flush caches on all external sites when - * 'announcement' node marked as 'publish externally' is created/modified + * an 'announcement' node marked as 'publish externally' is created/modified * or deleted. * + * @todo Decouple this from node save. Establishing connection to Azure PubSub + * service seems to take pretty long time + * + * @see https://helsinkisolutionoffice.atlassian.net/browse/UHF-8533 + * * @param \Drupal\Core\Entity\EntityInterface $entity * The entity to flush cache tags for. */ From 867e414eb9a127dca07ec0ed794fd3f4fc68ddc2 Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 31 Aug 2023 09:08:22 +0300 Subject: [PATCH 03/17] UHF-8525: Fixed changes from upstream --- .../custom/helfi_etusivu/helfi_etusivu.module | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/public/modules/custom/helfi_etusivu/helfi_etusivu.module b/public/modules/custom/helfi_etusivu/helfi_etusivu.module index ee4298fe3..84e47617f 100644 --- a/public/modules/custom/helfi_etusivu/helfi_etusivu.module +++ b/public/modules/custom/helfi_etusivu/helfi_etusivu.module @@ -130,19 +130,32 @@ function helfi_etusivu_cron() : void { * Implements hook_helfi_paragraph_types(). */ function helfi_etusivu_helfi_paragraph_types() : array { - $types = [ - 'field_content' => [ - 'front_page_latest_news', - 'front_page_top_news', - 'current', - 'event_list', + $entities = [ + 'node' => [ + 'landing_page' => [ + 'field_content' => [ + 'front_page_latest_news', + 'front_page_top_news', + 'current', + 'event_list', + ], + ], + 'page' => [ + 'field_lower_content' => [ + 'front_page_latest_news', + ], + ], ], ]; $enabled = []; - foreach ($types as $field => $paragraphTypes) { - foreach ($paragraphTypes as $paragraphType) { - $enabled[] = new ParagraphTypeCollection('node', 'landing_page', $field, $paragraphType); + foreach ($entities as $entityTypeId => $bundles) { + foreach ($bundles as $bundle => $fields) { + foreach ($fields as $field => $paragraphTypes) { + foreach ($paragraphTypes as $paragraphType) { + $enabled[] = new ParagraphTypeCollection($entityTypeId, $bundle, $field, $paragraphType); + } + } } } return $enabled; @@ -226,3 +239,10 @@ function helfi_etusivu_entity_delete(EntityInterface $entity) : void { function helfi_etusivu_entity_insert(EntityInterface $entity) : void { helfi_etusivu_invalidate_external_caches($entity); } + +/** + * Implements hook_helfi_hero_design_alter(). + */ +function helfi_etusivu_helfi_hero_design_alter(array &$designs): void { + $designs['with-search'] = t('With search'); +} From a76c7bbdd4360f698a232359d0949f842502364f Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 31 Aug 2023 09:08:55 +0300 Subject: [PATCH 04/17] UHF-8525: Readded access check from upstream --- public/modules/custom/helfi_etusivu/helfi_etusivu.module | 1 + 1 file changed, 1 insertion(+) diff --git a/public/modules/custom/helfi_etusivu/helfi_etusivu.module b/public/modules/custom/helfi_etusivu/helfi_etusivu.module index 84e47617f..79e9b2463 100644 --- a/public/modules/custom/helfi_etusivu/helfi_etusivu.module +++ b/public/modules/custom/helfi_etusivu/helfi_etusivu.module @@ -112,6 +112,7 @@ function helfi_etusivu_cron() : void { ->condition('promote', 1) ->condition('created', strtotime('-1 month'), '<') ->range(0, 50) + ->accessCheck(FALSE) ->execute(); $promoted_nodes = \Drupal::entityTypeManager() From ee71a6340795aaaae7b3febf586552985641de94 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Mon, 11 Sep 2023 13:35:02 +0300 Subject: [PATCH 05/17] UHF-8525: Add the published globally checkbox visible on the announcement form --- ...form_display.node.announcement.default.yml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/conf/cmi/core.entity_form_display.node.announcement.default.yml b/conf/cmi/core.entity_form_display.node.announcement.default.yml index 9ae76b692..b521f9a49 100644 --- a/conf/cmi/core.entity_form_display.node.announcement.default.yml +++ b/conf/cmi/core.entity_form_display.node.announcement.default.yml @@ -27,7 +27,7 @@ mode: default content: body: type: text_textarea_with_summary - weight: 15 + weight: 16 region: content settings: rows: 9 @@ -43,14 +43,14 @@ content: third_party_settings: { } field_announcement_all_pages: type: boolean_checkbox - weight: 11 + weight: 13 region: content settings: display_label: true third_party_settings: { } field_announcement_content_pages: type: select2_entity_reference - weight: 12 + weight: 15 region: content settings: width: 100% @@ -60,7 +60,7 @@ content: third_party_settings: { } field_announcement_link: type: link_default - weight: 16 + weight: 17 region: content settings: placeholder_url: '' @@ -78,7 +78,7 @@ content: third_party_settings: { } field_announcement_type: type: select2 - weight: 10 + weight: 11 region: content settings: width: 100% @@ -93,6 +93,13 @@ content: match_operator: CONTAINS match_limit: 20 third_party_settings: { } + field_publish_externally: + type: boolean_checkbox + weight: 14 + region: content + settings: + display_label: true + third_party_settings: { } langcode: type: language_select weight: 1 @@ -124,7 +131,7 @@ content: settings: { } third_party_settings: { } simple_sitemap: - weight: 10 + weight: 12 region: content settings: { } third_party_settings: { } @@ -165,7 +172,6 @@ content: settings: { } third_party_settings: { } hidden: - field_publish_externally: true hide_sidebar_navigation: true promote: true sticky: true From ce9707669bff4178be2dbd00fe269608a37b53d6 Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 14 Sep 2023 11:10:12 +0300 Subject: [PATCH 06/17] Fixed DTT test --- tests/dtt/src/ExistingSite/ExistingSiteTestBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dtt/src/ExistingSite/ExistingSiteTestBase.php b/tests/dtt/src/ExistingSite/ExistingSiteTestBase.php index 466d51ac4..235177288 100644 --- a/tests/dtt/src/ExistingSite/ExistingSiteTestBase.php +++ b/tests/dtt/src/ExistingSite/ExistingSiteTestBase.php @@ -17,7 +17,7 @@ abstract class ExistingSiteTestBase extends ExistingSiteBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp() : void { parent::setUp(); $this->setupDefaultConfiguration(); @@ -26,7 +26,7 @@ protected function setUp() { /** * {@inheritdoc} */ - public function tearDown() { + public function tearDown() : void { parent::tearDown(); $this->tearDownDefaultConfiguration(); } From c9887811a89927e3351d4c2004f4d2b72741815b Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 14 Sep 2023 11:20:15 +0300 Subject: [PATCH 07/17] Fixed DTT test command --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 975c3a4e2..0684d88d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,4 +65,4 @@ jobs: - name: Run PHPUnit tests run: | composer test-php public/modules/custom - [ -d "tests/" ] && composer test-php tests/ || echo "No DTT tests found. Ignoring..." + if [ -d "tests/" ]; then composer test-php tests/; else echo "No DTT tests found. Ignoring..."; fi From cf0ada6b8657caa7218a1094735f6b6f462af00f Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 14 Sep 2023 11:22:48 +0300 Subject: [PATCH 08/17] Fixed DTT base url --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 603e6d959..1a56d5be1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -16,7 +16,7 @@ - + From e034a46627ab54a1ff8382915a9f35908b30aaeb Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 14 Sep 2023 12:12:05 +0300 Subject: [PATCH 09/17] Use base classes provided by api-base module --- composer.lock | 12 +-- phpunit.xml.dist | 4 + .../src/ExistingSite/ExistingSiteTestBase.php | 34 ------- .../src/ExistingSite/NewsContentTypeTest.php | 7 +- .../ExistingSiteJavascriptTestBase.php | 34 ------- .../src/Traits/DefaultConfigurationTrait.php | 92 ------------------- 6 files changed, 16 insertions(+), 167 deletions(-) delete mode 100644 tests/dtt/src/ExistingSite/ExistingSiteTestBase.php delete mode 100644 tests/dtt/src/ExistingSiteJavascript/ExistingSiteJavascriptTestBase.php delete mode 100644 tests/dtt/src/Traits/DefaultConfigurationTrait.php diff --git a/composer.lock b/composer.lock index 84fadea8c..a1cc1913c 100644 --- a/composer.lock +++ b/composer.lock @@ -4046,16 +4046,16 @@ }, { "name": "drupal/helfi_api_base", - "version": "2.5.3", + "version": "2.5.4", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base.git", - "reference": "f5fab16526d75c612e420a68ebe933efb5c72a0e" + "reference": "2a0a4fb2ea863232dc3eed32a3e8104fdffab178" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/f5fab16526d75c612e420a68ebe933efb5c72a0e", - "reference": "f5fab16526d75c612e420a68ebe933efb5c72a0e", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/2a0a4fb2ea863232dc3eed32a3e8104fdffab178", + "reference": "2a0a4fb2ea863232dc3eed32a3e8104fdffab178", "shasum": "" }, "require": { @@ -4081,10 +4081,10 @@ ], "description": "Helfi - API Base", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.5.3", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.5.4", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/issues" }, - "time": "2023-09-13T05:29:57+00:00" + "time": "2023-09-14T09:11:02+00:00" }, { "name": "drupal/helfi_azure_fs", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1a56d5be1..0ae082a9a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -41,9 +41,13 @@ ./tests/dtt/src/ExistingSite + ./public/modules/custom/*/tests/src/ExistingSite + ./public/modules/contrib/*/tests/src/ExistingSite ./tests/dtt/src/ExistingSiteJavascript + ./public/modules/custom/*/tests/src/ExistingSiteJavascript + ./public/modules/contrib/*/tests/src/ExistingSiteJavascript diff --git a/tests/dtt/src/ExistingSite/ExistingSiteTestBase.php b/tests/dtt/src/ExistingSite/ExistingSiteTestBase.php deleted file mode 100644 index 235177288..000000000 --- a/tests/dtt/src/ExistingSite/ExistingSiteTestBase.php +++ /dev/null @@ -1,34 +0,0 @@ -setupDefaultConfiguration(); - } - - /** - * {@inheritdoc} - */ - public function tearDown() : void { - parent::tearDown(); - $this->tearDownDefaultConfiguration(); - } - -} diff --git a/tests/dtt/src/ExistingSite/NewsContentTypeTest.php b/tests/dtt/src/ExistingSite/NewsContentTypeTest.php index 17f5fe492..82bbee1b4 100644 --- a/tests/dtt/src/ExistingSite/NewsContentTypeTest.php +++ b/tests/dtt/src/ExistingSite/NewsContentTypeTest.php @@ -5,6 +5,7 @@ namespace Drupal\Tests\dtt\ExistingSite; use Drupal\Core\Session\AccountInterface; +use Drupal\Tests\helfi_api_base\Functional\ExistingSiteTestBase; /** * Tests news endpoint. @@ -54,7 +55,11 @@ public function assertNodeCreation() : void { * Asserts that news json list has the expected item. */ public function assertJsonApiList() : void { - $this->drupalGetWithLanguage('/jsonapi/node/news'); + // Sort items by changed date to make sure our newly added item is visible. + $this->drupalGetWithLanguage('/jsonapi/node/news', options: ['query' => [ + 'sort[changed][path]' => 'changed', + 'sort[changed][direction]' => 'DESC', + ]]); $this->assertSession()->statusCodeEquals(200); $json = json_decode($this->getSession()->getPage()->getContent(), TRUE); diff --git a/tests/dtt/src/ExistingSiteJavascript/ExistingSiteJavascriptTestBase.php b/tests/dtt/src/ExistingSiteJavascript/ExistingSiteJavascriptTestBase.php deleted file mode 100644 index 9bd0725b1..000000000 --- a/tests/dtt/src/ExistingSiteJavascript/ExistingSiteJavascriptTestBase.php +++ /dev/null @@ -1,34 +0,0 @@ -setupDefaultConfiguration(); - } - - /** - * {@inheritdoc} - */ - public function tearDown() { - parent::tearDown(); - $this->tearDownDefaultConfiguration(); - } - -} diff --git a/tests/dtt/src/Traits/DefaultConfigurationTrait.php b/tests/dtt/src/Traits/DefaultConfigurationTrait.php deleted file mode 100644 index a0f100a03..000000000 --- a/tests/dtt/src/Traits/DefaultConfigurationTrait.php +++ /dev/null @@ -1,92 +0,0 @@ -getLanguage($langcode); - } - - /** - * Wrapper for drupalGet() to always set language code. - * - * @param string|\Drupal\Core\Url $url - * The url. - * @param string $langcode - * The langcode. - * @param array $options - * The options. - * @param array $headers - * The headers. - */ - protected function drupalGetWithLanguage(string|Url $url, string $langcode = 'en', array $options = [], array $headers = []) : void { - $options['language'] = $this->getLanguage($langcode); - $this->drupalGet($url, $options, $headers); - } - - /** - * Set up the default configuration. - */ - protected function setupDefaultConfiguration() : void { - $this->defaultLanguage = $this->getDefaultLanguageConfiguration() - ->get('selected_langcode'); - $this->setDefaultLanguage('en'); - } - - /** - * Restores the default configuration. - */ - protected function tearDownDefaultConfiguration() : void { - $this->setDefaultLanguage($this->defaultLanguage); - } - - /** - * Gets the configuration. - * - * @return \Drupal\Core\Config\Config - * The default configuration. - */ - protected function getDefaultLanguageConfiguration() : Config { - return \Drupal::configFactory() - ->getEditable('language.negotiation'); - } - - /** - * Sets the default language. - * - * @param string $langcode - * The langcode to set as default. - */ - protected function setDefaultLanguage(string $langcode) : void { - $this->getDefaultLanguageConfiguration() - ->set('selected_langcode', $langcode) - ->save(); - } - -} From 126b7f8bbb7b4b16ad40e38e9c391a1a0b7a601d Mon Sep 17 00:00:00 2001 From: tuutti Date: Mon, 18 Sep 2023 10:59:04 +0300 Subject: [PATCH 10/17] UHF-8527: Start PubSub cron --- docker/openshift/crons/base.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/openshift/crons/base.sh b/docker/openshift/crons/base.sh index 72d1ca248..764be0070 100644 --- a/docker/openshift/crons/base.sh +++ b/docker/openshift/crons/base.sh @@ -41,6 +41,7 @@ exec "/crons/purge-queue.sh" & exec "/crons/update-translations.sh" & # Uncomment this to enable content scheduler exec "/crons/content-scheduler.sh" & +exec "/crons/pubsub.sh" & while true do From c6237f9ff8154bdb1c31d72877d22b05a23f2c3f Mon Sep 17 00:00:00 2001 From: actions-bot Date: Mon, 18 Sep 2023 08:44:07 +0000 Subject: [PATCH 11/17] Update configuration --- composer.lock | 60 ++++++++++---------- conf/cmi/helfi_api_base.delete_revisions.yml | 6 ++ 2 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 conf/cmi/helfi_api_base.delete_revisions.yml diff --git a/composer.lock b/composer.lock index 62129eed1..b4689fae6 100644 --- a/composer.lock +++ b/composer.lock @@ -3927,16 +3927,16 @@ }, { "name": "drupal/hdbt", - "version": "5.6.1", + "version": "5.6.4", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "d4eeff38bc61f431613c8fa9a4d92a8755f66b09" + "reference": "ac16cedbd3323e97c23d4e29c61260221601ec29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/d4eeff38bc61f431613c8fa9a4d92a8755f66b09", - "reference": "d4eeff38bc61f431613c8fa9a4d92a8755f66b09", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/ac16cedbd3323e97c23d4e29c61260221601ec29", + "reference": "ac16cedbd3323e97c23d4e29c61260221601ec29", "shasum": "" }, "require": { @@ -3954,10 +3954,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.6.1", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.6.4", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2023-09-11T12:42:43+00:00" + "time": "2023-09-15T04:35:43+00:00" }, { "name": "drupal/hdbt_admin", @@ -4046,16 +4046,16 @@ }, { "name": "drupal/helfi_api_base", - "version": "2.5.4", + "version": "2.5.5", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base.git", - "reference": "2a0a4fb2ea863232dc3eed32a3e8104fdffab178" + "reference": "7ffd5b029f1d85590dc8966007f3936f14cb3c35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/2a0a4fb2ea863232dc3eed32a3e8104fdffab178", - "reference": "2a0a4fb2ea863232dc3eed32a3e8104fdffab178", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/7ffd5b029f1d85590dc8966007f3936f14cb3c35", + "reference": "7ffd5b029f1d85590dc8966007f3936f14cb3c35", "shasum": "" }, "require": { @@ -4081,10 +4081,10 @@ ], "description": "Helfi - API Base", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.5.4", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.5.5", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/issues" }, - "time": "2023-09-14T09:11:02+00:00" + "time": "2023-09-18T06:55:18+00:00" }, { "name": "drupal/helfi_azure_fs", @@ -4153,16 +4153,16 @@ }, { "name": "drupal/helfi_navigation", - "version": "2.0.13", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation.git", - "reference": "c2497e87c7b4242354c323aad5c21ec09e37d3a7" + "reference": "668049d8601e4d9bbc2525fac4616b583960b97a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-navigation/zipball/c2497e87c7b4242354c323aad5c21ec09e37d3a7", - "reference": "c2497e87c7b4242354c323aad5c21ec09e37d3a7", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-navigation/zipball/668049d8601e4d9bbc2525fac4616b583960b97a", + "reference": "668049d8601e4d9bbc2525fac4616b583960b97a", "shasum": "" }, "require": { @@ -4180,23 +4180,23 @@ ], "description": "Helfi - Navigation", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation/tree/2.0.13", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation/tree/2.1.0", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation/issues" }, - "time": "2023-09-13T05:51:44+00:00" + "time": "2023-09-16T04:24:11+00:00" }, { "name": "drupal/helfi_platform_config", - "version": "3.4.5", + "version": "3.4.8", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "90394a0feab45409ed2c2101ef3d48c02906714e" + "reference": "af36011732e5569b39602252515a12f6b1b56c44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/90394a0feab45409ed2c2101ef3d48c02906714e", - "reference": "90394a0feab45409ed2c2101ef3d48c02906714e", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/af36011732e5569b39602252515a12f6b1b56c44", + "reference": "af36011732e5569b39602252515a12f6b1b56c44", "shasum": "" }, "require": { @@ -4299,10 +4299,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.5", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.8", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2023-09-13T06:57:57+00:00" + "time": "2023-09-18T07:53:37+00:00" }, { "name": "drupal/helfi_proxy", @@ -4350,16 +4350,16 @@ }, { "name": "drupal/helfi_tpr", - "version": "2.2.6", + "version": "2.2.7", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-tpr.git", - "reference": "f73c27c4d30522303dfadf1228c7331e120f04ac" + "reference": "68a4e65acffc2038e5006f1d4b2763bc52017184" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-tpr/zipball/f73c27c4d30522303dfadf1228c7331e120f04ac", - "reference": "f73c27c4d30522303dfadf1228c7331e120f04ac", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-tpr/zipball/68a4e65acffc2038e5006f1d4b2763bc52017184", + "reference": "68a4e65acffc2038e5006f1d4b2763bc52017184", "shasum": "" }, "require": { @@ -4385,10 +4385,10 @@ ], "description": "TPR integration", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-tpr/tree/2.2.6", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-tpr/tree/2.2.7", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-tpr/issues" }, - "time": "2023-09-01T12:09:30+00:00" + "time": "2023-09-14T11:48:29+00:00" }, { "name": "drupal/helfi_tunnistamo", diff --git a/conf/cmi/helfi_api_base.delete_revisions.yml b/conf/cmi/helfi_api_base.delete_revisions.yml new file mode 100644 index 000000000..6955f6676 --- /dev/null +++ b/conf/cmi/helfi_api_base.delete_revisions.yml @@ -0,0 +1,6 @@ +entity_types: + - node + - paragraph + - tpr_unit + - tpr_service + - tpr_errand_service From 9616b4358e8391fd138dbd9b6e3e76985d38667e Mon Sep 17 00:00:00 2001 From: actions-bot Date: Thu, 21 Sep 2023 06:33:17 +0000 Subject: [PATCH 12/17] Update configuration --- composer.lock | 74 +++++++++++++++++++++++----------------------- docker-compose.yml | 16 ---------- 2 files changed, 37 insertions(+), 53 deletions(-) diff --git a/composer.lock b/composer.lock index b4689fae6..ae99817ea 100644 --- a/composer.lock +++ b/composer.lock @@ -2136,16 +2136,16 @@ }, { "name": "drupal/core", - "version": "9.5.10", + "version": "9.5.11", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "c84bab7403943fbc4ed90ffcdde4460a94642b06" + "reference": "8afcb233c2a71501b35fed2713167c37831d5c19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/c84bab7403943fbc4ed90ffcdde4460a94642b06", - "reference": "c84bab7403943fbc4ed90ffcdde4460a94642b06", + "url": "https://api.github.com/repos/drupal/core/zipball/8afcb233c2a71501b35fed2713167c37831d5c19", + "reference": "8afcb233c2a71501b35fed2713167c37831d5c19", "shasum": "" }, "require": { @@ -2297,9 +2297,9 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/9.5.10" + "source": "https://github.com/drupal/core/tree/9.5.11" }, - "time": "2023-07-05T09:26:59+00:00" + "time": "2023-09-19T17:58:28+00:00" }, { "name": "drupal/core-composer-scaffold", @@ -3927,16 +3927,16 @@ }, { "name": "drupal/hdbt", - "version": "5.6.4", + "version": "5.6.5", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "ac16cedbd3323e97c23d4e29c61260221601ec29" + "reference": "b9e7c69b79d822f3d53725c79e6cd4a2f976aaa6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/ac16cedbd3323e97c23d4e29c61260221601ec29", - "reference": "ac16cedbd3323e97c23d4e29c61260221601ec29", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/b9e7c69b79d822f3d53725c79e6cd4a2f976aaa6", + "reference": "b9e7c69b79d822f3d53725c79e6cd4a2f976aaa6", "shasum": "" }, "require": { @@ -3954,10 +3954,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.6.4", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.6.5", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2023-09-15T04:35:43+00:00" + "time": "2023-09-21T06:30:24+00:00" }, { "name": "drupal/hdbt_admin", @@ -4131,12 +4131,12 @@ "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-tools.git", - "reference": "0ebc9e72b92b37fa37bd3eb003c4f4d0db329bfa" + "reference": "640edf67a34bf37e44c24b75e45e946c7ddb8ef0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/0ebc9e72b92b37fa37bd3eb003c4f4d0db329bfa", - "reference": "0ebc9e72b92b37fa37bd3eb003c4f4d0db329bfa", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/640edf67a34bf37e44c24b75e45e946c7ddb8ef0", + "reference": "640edf67a34bf37e44c24b75e45e946c7ddb8ef0", "shasum": "" }, "default-branch": true, @@ -4149,7 +4149,7 @@ "source": "https://github.com/City-of-Helsinki/drupal-tools/tree/main", "issues": "https://github.com/City-of-Helsinki/drupal-tools/issues" }, - "time": "2023-09-06T06:27:11+00:00" + "time": "2023-09-19T05:58:55+00:00" }, { "name": "drupal/helfi_navigation", @@ -4187,16 +4187,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "3.4.8", + "version": "3.4.9", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "af36011732e5569b39602252515a12f6b1b56c44" + "reference": "0944074c7d8f1e4dfe37e05b25e6f442cf5c6576" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/af36011732e5569b39602252515a12f6b1b56c44", - "reference": "af36011732e5569b39602252515a12f6b1b56c44", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/0944074c7d8f1e4dfe37e05b25e6f442cf5c6576", + "reference": "0944074c7d8f1e4dfe37e05b25e6f442cf5c6576", "shasum": "" }, "require": { @@ -4299,10 +4299,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.8", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.9", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2023-09-18T07:53:37+00:00" + "time": "2023-09-20T13:23:27+00:00" }, { "name": "drupal/helfi_proxy", @@ -9216,30 +9216,30 @@ }, { "name": "laminas/laminas-stdlib", - "version": "3.17.0", + "version": "3.18.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "dd35c868075bad80b6718959740913e178eb4274" + "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/dd35c868075bad80b6718959740913e178eb4274", - "reference": "dd35c868075bad80b6718959740913e178eb4274", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", + "reference": "e85b29076c6216e7fc98e72b42dbe1bbc3b95ecf", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { "laminas/laminas-coding-standard": "^2.5", - "phpbench/phpbench": "^1.2.9", - "phpunit/phpunit": "^10.0.16", + "phpbench/phpbench": "^1.2.14", + "phpunit/phpunit": "^10.3.3", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.8" + "vimeo/psalm": "^5.15.0" }, "type": "library", "autoload": { @@ -9271,7 +9271,7 @@ "type": "community_bridge" } ], - "time": "2023-03-20T13:51:37+00:00" + "time": "2023-09-19T10:15:21+00:00" }, { "name": "league/container", @@ -16972,16 +16972,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.0", + "version": "1.24.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6" + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/3510b0a6274cc42f7219367cb3abfc123ffa09d6", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", "shasum": "" }, "require": { @@ -17013,9 +17013,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1" }, - "time": "2023-09-07T20:46:32+00:00" + "time": "2023-09-18T12:18:02+00:00" }, { "name": "phpstan/phpstan", diff --git a/docker-compose.yml b/docker-compose.yml index e8b205098..c9be64c76 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,22 +82,6 @@ services: - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-varnish.tls=true" - "traefik.http.services.${COMPOSE_PROJECT_NAME}-varnish.loadbalancer.server.port=6081" - "traefik.docker.network=stonehenge-network" - robo: - image: ghcr.io/city-of-helsinki/drupal-robo:latest - shm_size: '2gb' - tty: true - volumes: - - .:/app:delegated - networks: - - internal - - stonehenge-network - depends_on: - - app - profiles: - - testing - extra_hosts: - - "${DRUPAL_HOSTNAME}:host-gateway" - - "varnish-${DRUPAL_HOSTNAME}:host-gateway" networks: internal: external: false From 14df8f0d06d463c6eb59b9625eb0146f6592f0f9 Mon Sep 17 00:00:00 2001 From: actions-bot Date: Tue, 26 Sep 2023 09:52:44 +0000 Subject: [PATCH 13/17] Update configuration --- composer.lock | 56 +++++++++---------- ...field_override.node.announcement.title.yml | 20 +++++++ ...form_display.node.announcement.default.yml | 29 +++++----- ...view_display.node.announcement.default.yml | 11 +++- ..._view_display.node.announcement.teaser.yml | 4 +- ....announcement.field_announcement_title.yml | 21 +++++++ ....storage.node.field_announcement_title.yml | 23 ++++++++ ....announcement.field_announcement_title.yml | 2 + 8 files changed, 123 insertions(+), 43 deletions(-) create mode 100644 conf/cmi/core.base_field_override.node.announcement.title.yml create mode 100644 conf/cmi/field.field.node.announcement.field_announcement_title.yml create mode 100644 conf/cmi/field.storage.node.field_announcement_title.yml create mode 100644 conf/cmi/language/fi/field.field.node.announcement.field_announcement_title.yml diff --git a/composer.lock b/composer.lock index ae99817ea..d6151f0b8 100644 --- a/composer.lock +++ b/composer.lock @@ -3927,16 +3927,16 @@ }, { "name": "drupal/hdbt", - "version": "5.6.5", + "version": "5.6.12", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "b9e7c69b79d822f3d53725c79e6cd4a2f976aaa6" + "reference": "c24eecd637d0373f9da2bcc01336feee376fcaf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/b9e7c69b79d822f3d53725c79e6cd4a2f976aaa6", - "reference": "b9e7c69b79d822f3d53725c79e6cd4a2f976aaa6", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/c24eecd637d0373f9da2bcc01336feee376fcaf1", + "reference": "c24eecd637d0373f9da2bcc01336feee376fcaf1", "shasum": "" }, "require": { @@ -3954,10 +3954,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.6.5", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.6.12", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2023-09-21T06:30:24+00:00" + "time": "2023-09-26T09:47:13+00:00" }, { "name": "drupal/hdbt_admin", @@ -4131,12 +4131,12 @@ "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-tools.git", - "reference": "640edf67a34bf37e44c24b75e45e946c7ddb8ef0" + "reference": "8dfd9dda99f0934070119547e7f950d3f90a9ebc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/640edf67a34bf37e44c24b75e45e946c7ddb8ef0", - "reference": "640edf67a34bf37e44c24b75e45e946c7ddb8ef0", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/8dfd9dda99f0934070119547e7f950d3f90a9ebc", + "reference": "8dfd9dda99f0934070119547e7f950d3f90a9ebc", "shasum": "" }, "default-branch": true, @@ -4149,20 +4149,20 @@ "source": "https://github.com/City-of-Helsinki/drupal-tools/tree/main", "issues": "https://github.com/City-of-Helsinki/drupal-tools/issues" }, - "time": "2023-09-19T05:58:55+00:00" + "time": "2023-09-26T09:45:28+00:00" }, { "name": "drupal/helfi_navigation", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation.git", - "reference": "668049d8601e4d9bbc2525fac4616b583960b97a" + "reference": "5c0f648a21220a6e8b6c14543f8e60b4b843a918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-navigation/zipball/668049d8601e4d9bbc2525fac4616b583960b97a", - "reference": "668049d8601e4d9bbc2525fac4616b583960b97a", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-navigation/zipball/5c0f648a21220a6e8b6c14543f8e60b4b843a918", + "reference": "5c0f648a21220a6e8b6c14543f8e60b4b843a918", "shasum": "" }, "require": { @@ -4180,23 +4180,23 @@ ], "description": "Helfi - Navigation", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation/tree/2.1.0", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation/tree/2.1.1", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-navigation/issues" }, - "time": "2023-09-16T04:24:11+00:00" + "time": "2023-09-21T08:34:22+00:00" }, { "name": "drupal/helfi_platform_config", - "version": "3.4.9", + "version": "3.4.15", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "0944074c7d8f1e4dfe37e05b25e6f442cf5c6576" + "reference": "4c85285f69a08e58e04f9da7e27e410881793896" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/0944074c7d8f1e4dfe37e05b25e6f442cf5c6576", - "reference": "0944074c7d8f1e4dfe37e05b25e6f442cf5c6576", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/4c85285f69a08e58e04f9da7e27e410881793896", + "reference": "4c85285f69a08e58e04f9da7e27e410881793896", "shasum": "" }, "require": { @@ -4299,10 +4299,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.9", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.15", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2023-09-20T13:23:27+00:00" + "time": "2023-09-26T09:47:18+00:00" }, { "name": "drupal/helfi_proxy", @@ -11169,16 +11169,16 @@ }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -11215,9 +11215,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", diff --git a/conf/cmi/core.base_field_override.node.announcement.title.yml b/conf/cmi/core.base_field_override.node.announcement.title.yml new file mode 100644 index 000000000..5eda24a99 --- /dev/null +++ b/conf/cmi/core.base_field_override.node.announcement.title.yml @@ -0,0 +1,20 @@ +uuid: 049b3dd7-afc2-481f-b648-3869d01e681e +langcode: en +status: true +dependencies: + config: + - node.type.announcement +_core: + default_config_hash: v0rg9ztfYRnKz2PXAcGD_Q52rTcPbwqaZLw3tXWd4rM +id: node.announcement.title +field_name: title +entity_type: node +bundle: announcement +label: 'Administrative title' +description: '' +required: true +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/conf/cmi/core.entity_form_display.node.announcement.default.yml b/conf/cmi/core.entity_form_display.node.announcement.default.yml index b521f9a49..67510a4b6 100644 --- a/conf/cmi/core.entity_form_display.node.announcement.default.yml +++ b/conf/cmi/core.entity_form_display.node.announcement.default.yml @@ -7,6 +7,7 @@ dependencies: - field.field.node.announcement.field_announcement_all_pages - field.field.node.announcement.field_announcement_content_pages - field.field.node.announcement.field_announcement_link + - field.field.node.announcement.field_announcement_title - field.field.node.announcement.field_announcement_type - field.field.node.announcement.field_publish_externally - node.type.announcement @@ -19,7 +20,7 @@ dependencies: - select2 - text _core: - default_config_hash: le2Wzlas0qZ9Bj-o6WlJbHDeisFrucs9F4B3VOK8t_w + default_config_hash: 0ewsu2ZhpNhAo4t7wkUgEa9ABQAkcsF7IXtR-kFeDUg id: node.announcement.default targetEntityType: node bundle: announcement @@ -27,7 +28,7 @@ mode: default content: body: type: text_textarea_with_summary - weight: 16 + weight: 18 region: content settings: rows: 9 @@ -50,7 +51,7 @@ content: third_party_settings: { } field_announcement_content_pages: type: select2_entity_reference - weight: 15 + weight: 14 region: content settings: width: 100% @@ -60,7 +61,7 @@ content: third_party_settings: { } field_announcement_link: type: link_default - weight: 17 + weight: 19 region: content settings: placeholder_url: '' @@ -68,7 +69,7 @@ content: third_party_settings: { } field_announcement_service_pages: type: select2_entity_reference - weight: 14 + weight: 16 region: content settings: width: 100% @@ -76,6 +77,14 @@ content: match_operator: CONTAINS match_limit: 20 third_party_settings: { } + field_announcement_title: + type: string_textfield + weight: 17 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } field_announcement_type: type: select2 weight: 11 @@ -85,7 +94,7 @@ content: third_party_settings: { } field_announcement_unit_pages: type: select2_entity_reference - weight: 13 + weight: 15 region: content settings: width: 100% @@ -93,13 +102,6 @@ content: match_operator: CONTAINS match_limit: 20 third_party_settings: { } - field_publish_externally: - type: boolean_checkbox - weight: 14 - region: content - settings: - display_label: true - third_party_settings: { } langcode: type: language_select weight: 1 @@ -172,6 +174,7 @@ content: settings: { } third_party_settings: { } hidden: + field_publish_externally: true hide_sidebar_navigation: true promote: true sticky: true diff --git a/conf/cmi/core.entity_view_display.node.announcement.default.yml b/conf/cmi/core.entity_view_display.node.announcement.default.yml index 7d7737670..a6b8a05ce 100644 --- a/conf/cmi/core.entity_view_display.node.announcement.default.yml +++ b/conf/cmi/core.entity_view_display.node.announcement.default.yml @@ -7,6 +7,7 @@ dependencies: - field.field.node.announcement.field_announcement_all_pages - field.field.node.announcement.field_announcement_content_pages - field.field.node.announcement.field_announcement_link + - field.field.node.announcement.field_announcement_title - field.field.node.announcement.field_announcement_type - field.field.node.announcement.field_publish_externally - node.type.announcement @@ -16,7 +17,7 @@ dependencies: - text - user _core: - default_config_hash: IHF-sP4Gq6tdTyWDxQDDEdLbHz3-QzklMNE1QA2mQU0 + default_config_hash: LQ9K_wCbd758UCcNEORQvFUQ7gNJddkukiwwYHrZv4c id: node.announcement.default targetEntityType: node bundle: announcement @@ -41,6 +42,14 @@ content: third_party_settings: { } weight: 3 region: content + field_announcement_title: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 4 + region: content field_announcement_type: type: list_default label: hidden diff --git a/conf/cmi/core.entity_view_display.node.announcement.teaser.yml b/conf/cmi/core.entity_view_display.node.announcement.teaser.yml index 819c4997a..e3bc62941 100644 --- a/conf/cmi/core.entity_view_display.node.announcement.teaser.yml +++ b/conf/cmi/core.entity_view_display.node.announcement.teaser.yml @@ -8,6 +8,7 @@ dependencies: - field.field.node.announcement.field_announcement_all_pages - field.field.node.announcement.field_announcement_content_pages - field.field.node.announcement.field_announcement_link + - field.field.node.announcement.field_announcement_title - field.field.node.announcement.field_announcement_type - field.field.node.announcement.field_publish_externally - node.type.announcement @@ -15,7 +16,7 @@ dependencies: - text - user _core: - default_config_hash: FhIJpRvY90w782EYtR2V2Yfppyglwp191xkVdXEEbbM + default_config_hash: OwH532HYBVjDOUW0iJnoDWc2yFGZwwGJnAZEmZPjLCA id: node.announcement.teaser targetEntityType: node bundle: announcement @@ -39,6 +40,7 @@ hidden: field_announcement_content_pages: true field_announcement_link: true field_announcement_service_pages: true + field_announcement_title: true field_announcement_type: true field_announcement_unit_pages: true field_publish_externally: true diff --git a/conf/cmi/field.field.node.announcement.field_announcement_title.yml b/conf/cmi/field.field.node.announcement.field_announcement_title.yml new file mode 100644 index 000000000..940e46b32 --- /dev/null +++ b/conf/cmi/field.field.node.announcement.field_announcement_title.yml @@ -0,0 +1,21 @@ +uuid: ed800b6e-cbe6-473b-a8af-cb545a8a4481 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_announcement_title + - node.type.announcement +_core: + default_config_hash: f0piVjyoLRnZfc5fbRP6BdQ6_iMw7az35Req0V6Z4mg +id: node.announcement.field_announcement_title +field_name: field_announcement_title +entity_type: node +bundle: announcement +label: 'Announcement title' +description: 'This title is only available to users of assistive technology. ' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/conf/cmi/field.storage.node.field_announcement_title.yml b/conf/cmi/field.storage.node.field_announcement_title.yml new file mode 100644 index 000000000..4ba43b98a --- /dev/null +++ b/conf/cmi/field.storage.node.field_announcement_title.yml @@ -0,0 +1,23 @@ +uuid: f3e37f50-b1d1-4861-b867-065f9b5e66ad +langcode: en +status: true +dependencies: + module: + - node +_core: + default_config_hash: dDVMTZxf5aD5P9HjLJX_6ThWFSclPORpZMThR3dd_XY +id: node.field_announcement_title +field_name: field_announcement_title +entity_type: node +type: string +settings: + max_length: 255 + case_sensitive: false + is_ascii: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/conf/cmi/language/fi/field.field.node.announcement.field_announcement_title.yml b/conf/cmi/language/fi/field.field.node.announcement.field_announcement_title.yml new file mode 100644 index 000000000..8d33f85f2 --- /dev/null +++ b/conf/cmi/language/fi/field.field.node.announcement.field_announcement_title.yml @@ -0,0 +1,2 @@ +label: 'Poikkeusilmoituksen otsikko' +description: 'Tämä otsikko on avustavan teknologian käyttäjiä varten.' From 57a60a652c2edb5eb55eec55c9254b808f339c02 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Tue, 26 Sep 2023 15:57:13 +0300 Subject: [PATCH 14/17] Make the global announcement check box visible on the node form --- ...ty_form_display.node.announcement.default.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/conf/cmi/core.entity_form_display.node.announcement.default.yml b/conf/cmi/core.entity_form_display.node.announcement.default.yml index 67510a4b6..0cc1059bd 100644 --- a/conf/cmi/core.entity_form_display.node.announcement.default.yml +++ b/conf/cmi/core.entity_form_display.node.announcement.default.yml @@ -28,7 +28,7 @@ mode: default content: body: type: text_textarea_with_summary - weight: 18 + weight: 17 region: content settings: rows: 9 @@ -51,7 +51,7 @@ content: third_party_settings: { } field_announcement_content_pages: type: select2_entity_reference - weight: 14 + weight: 15 region: content settings: width: 100% @@ -61,7 +61,7 @@ content: third_party_settings: { } field_announcement_link: type: link_default - weight: 19 + weight: 18 region: content settings: placeholder_url: '' @@ -79,7 +79,7 @@ content: third_party_settings: { } field_announcement_title: type: string_textfield - weight: 17 + weight: 16 region: content settings: size: 60 @@ -102,6 +102,13 @@ content: match_operator: CONTAINS match_limit: 20 third_party_settings: { } + field_publish_externally: + type: boolean_checkbox + weight: 14 + region: content + settings: + display_label: true + third_party_settings: { } langcode: type: language_select weight: 1 @@ -174,7 +181,6 @@ content: settings: { } third_party_settings: { } hidden: - field_publish_externally: true hide_sidebar_navigation: true promote: true sticky: true From b4f1f70799fb6d96c52952ffdec183ecffcbf19b Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Wed, 27 Sep 2023 09:44:28 +0300 Subject: [PATCH 15/17] UHF-9060: Update helfi_tunnistamo to 3.0.0 version --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index be20869ba..0ecb8ddc0 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "drupal/helfi_navigation": "^2.0", "drupal/helfi_platform_config": "^3.0", "drupal/helfi_proxy": "^3.0", - "drupal/helfi_tunnistamo": "^2.0", + "drupal/helfi_tunnistamo": "^3.0", "drupal/json_field": "^1.0@RC", "drupal/jsonapi_extras": "^3.20", "drupal/jsonapi_menu_items": "^1.2", diff --git a/composer.lock b/composer.lock index d6151f0b8..64dbe1e3f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "38a5de68ca127fbad511d10cc554fd4b", + "content-hash": "5980295a9b1b026de91a603c8116697c", "packages": [ { "name": "asm89/stack-cors", @@ -4392,16 +4392,16 @@ }, { "name": "drupal/helfi_tunnistamo", - "version": "2.2.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-tunnistamo.git", - "reference": "17badf64ebfcc6a30458634b19a4387cb4ce3d34" + "reference": "29e98d8a1c9fd39a98da7ce2b44fdc28a614bd99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-tunnistamo/zipball/17badf64ebfcc6a30458634b19a4387cb4ce3d34", - "reference": "17badf64ebfcc6a30458634b19a4387cb4ce3d34", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-tunnistamo/zipball/29e98d8a1c9fd39a98da7ce2b44fdc28a614bd99", + "reference": "29e98d8a1c9fd39a98da7ce2b44fdc28a614bd99", "shasum": "" }, "require": { @@ -4418,10 +4418,10 @@ ], "description": "Tunnistamo integration", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-tunnistamo/tree/2.2.4", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-tunnistamo/tree/3.0.0", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-tunnistamo/issues" }, - "time": "2023-05-17T11:53:24+00:00" + "time": "2023-08-28T07:28:23+00:00" }, { "name": "drupal/image_style_quality", From 79124b3f3e17445a8911593998d33648b90b50a8 Mon Sep 17 00:00:00 2001 From: actions-bot Date: Wed, 27 Sep 2023 08:17:50 +0000 Subject: [PATCH 16/17] Update configuration --- composer.lock | 24 +++++++++---------- ...form_display.node.announcement.default.yml | 16 ++++--------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/composer.lock b/composer.lock index d6151f0b8..6fb116d12 100644 --- a/composer.lock +++ b/composer.lock @@ -4187,16 +4187,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "3.4.15", + "version": "3.4.17", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "4c85285f69a08e58e04f9da7e27e410881793896" + "reference": "46244701cdef62af87c7e376b4e43391ee6c870c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/4c85285f69a08e58e04f9da7e27e410881793896", - "reference": "4c85285f69a08e58e04f9da7e27e410881793896", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/46244701cdef62af87c7e376b4e43391ee6c870c", + "reference": "46244701cdef62af87c7e376b4e43391ee6c870c", "shasum": "" }, "require": { @@ -4299,10 +4299,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.15", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.4.17", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2023-09-26T09:47:18+00:00" + "time": "2023-09-27T08:15:04+00:00" }, { "name": "drupal/helfi_proxy", @@ -16972,16 +16972,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.1", + "version": "1.24.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01" + "reference": "bcad8d995980440892759db0c32acae7c8e79442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", - "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", + "reference": "bcad8d995980440892759db0c32acae7c8e79442", "shasum": "" }, "require": { @@ -17013,9 +17013,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" }, - "time": "2023-09-18T12:18:02+00:00" + "time": "2023-09-26T12:28:12+00:00" }, { "name": "phpstan/phpstan", diff --git a/conf/cmi/core.entity_form_display.node.announcement.default.yml b/conf/cmi/core.entity_form_display.node.announcement.default.yml index 0cc1059bd..67510a4b6 100644 --- a/conf/cmi/core.entity_form_display.node.announcement.default.yml +++ b/conf/cmi/core.entity_form_display.node.announcement.default.yml @@ -28,7 +28,7 @@ mode: default content: body: type: text_textarea_with_summary - weight: 17 + weight: 18 region: content settings: rows: 9 @@ -51,7 +51,7 @@ content: third_party_settings: { } field_announcement_content_pages: type: select2_entity_reference - weight: 15 + weight: 14 region: content settings: width: 100% @@ -61,7 +61,7 @@ content: third_party_settings: { } field_announcement_link: type: link_default - weight: 18 + weight: 19 region: content settings: placeholder_url: '' @@ -79,7 +79,7 @@ content: third_party_settings: { } field_announcement_title: type: string_textfield - weight: 16 + weight: 17 region: content settings: size: 60 @@ -102,13 +102,6 @@ content: match_operator: CONTAINS match_limit: 20 third_party_settings: { } - field_publish_externally: - type: boolean_checkbox - weight: 14 - region: content - settings: - display_label: true - third_party_settings: { } langcode: type: language_select weight: 1 @@ -181,6 +174,7 @@ content: settings: { } third_party_settings: { } hidden: + field_publish_externally: true hide_sidebar_navigation: true promote: true sticky: true From 783c2d7c43c63923fbbfdabef00f76be01d89e42 Mon Sep 17 00:00:00 2001 From: rpnykanen <48206082+rpnykanen@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:41:49 +0300 Subject: [PATCH 17/17] automatic update tried to remove global announcement button --- ...ty_form_display.node.announcement.default.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/conf/cmi/core.entity_form_display.node.announcement.default.yml b/conf/cmi/core.entity_form_display.node.announcement.default.yml index 67510a4b6..0cc1059bd 100644 --- a/conf/cmi/core.entity_form_display.node.announcement.default.yml +++ b/conf/cmi/core.entity_form_display.node.announcement.default.yml @@ -28,7 +28,7 @@ mode: default content: body: type: text_textarea_with_summary - weight: 18 + weight: 17 region: content settings: rows: 9 @@ -51,7 +51,7 @@ content: third_party_settings: { } field_announcement_content_pages: type: select2_entity_reference - weight: 14 + weight: 15 region: content settings: width: 100% @@ -61,7 +61,7 @@ content: third_party_settings: { } field_announcement_link: type: link_default - weight: 19 + weight: 18 region: content settings: placeholder_url: '' @@ -79,7 +79,7 @@ content: third_party_settings: { } field_announcement_title: type: string_textfield - weight: 17 + weight: 16 region: content settings: size: 60 @@ -102,6 +102,13 @@ content: match_operator: CONTAINS match_limit: 20 third_party_settings: { } + field_publish_externally: + type: boolean_checkbox + weight: 14 + region: content + settings: + display_label: true + third_party_settings: { } langcode: type: language_select weight: 1 @@ -174,7 +181,6 @@ content: settings: { } third_party_settings: { } hidden: - field_publish_externally: true hide_sidebar_navigation: true promote: true sticky: true