diff --git a/config/sync/taxonomy.vocabulary.department.yml b/config/sync/taxonomy.vocabulary.department.yml index f300f0b2..8fe0ca84 100644 --- a/config/sync/taxonomy.vocabulary.department.yml +++ b/config/sync/taxonomy.vocabulary.department.yml @@ -6,3 +6,4 @@ name: Afdeling vid: department description: 'Afdeling (Magistrat) for brugere og indhold' weight: 0 +new_revision: false diff --git a/web/modules/custom/hoeringsportal_base_fixtures/src/Fixture/ParagraphFixture.php b/web/modules/custom/hoeringsportal_base_fixtures/src/Fixture/ParagraphFixture.php index b56ff3a7..6726f5be 100644 --- a/web/modules/custom/hoeringsportal_base_fixtures/src/Fixture/ParagraphFixture.php +++ b/web/modules/custom/hoeringsportal_base_fixtures/src/Fixture/ParagraphFixture.php @@ -95,17 +95,6 @@ public function load() { $paragraph->save(); $this->addReference('paragraph:content_list:all_public_meetings', $paragraph); - $paragraph = Paragraph::create([ - 'type' => 'content_list', - 'field_content_list' => [ - 'target_id' => 'all_hearings', - 'display_id' => 'default', - ], - 'field_list_title' => 'Alle høringer', - ]); - $paragraph->save(); - $this->addReference('paragraph:content_list:all_hearings', $paragraph); - $paragraph = Paragraph::create([ 'type' => 'info_box', 'field_content_block_text' => [ diff --git a/web/modules/custom/hoeringsportal_content_access/src/Helper.php b/web/modules/custom/hoeringsportal_content_access/src/Helper.php index 07a7cd70..eb140e3b 100644 --- a/web/modules/custom/hoeringsportal_content_access/src/Helper.php +++ b/web/modules/custom/hoeringsportal_content_access/src/Helper.php @@ -263,7 +263,7 @@ private function getDepartments(ContentEntityBase $entity): array { * @param \Drupal\Core\Session\AccountInterface $account * The account. */ - private function getUserDepartments(AccountInterface $account = NULL): array { + private function getUserDepartments(?AccountInterface $account = NULL): array { $account ??= $this->currentUser; if (empty($this->userDepartments[$account->id()])) { $user = $this->userStorage->load($account->id()); @@ -276,7 +276,7 @@ private function getUserDepartments(AccountInterface $account = NULL): array { /** * Get list of node IDs an account has edit access to. */ - private function getUserDepartmentNodeIds(AccountInterface $account = NULL): array { + private function getUserDepartmentNodeIds(?AccountInterface $account = NULL): array { $account ??= $this->currentUser; $departments = $this->getUserDepartments($account); $query = $this->nodeStorage->getQuery(); diff --git a/web/modules/custom/hoeringsportal_deskpro/src/Service/DeskproService.php b/web/modules/custom/hoeringsportal_deskpro/src/Service/DeskproService.php index 3d45b2b6..eee6b88f 100644 --- a/web/modules/custom/hoeringsportal_deskpro/src/Service/DeskproService.php +++ b/web/modules/custom/hoeringsportal_deskpro/src/Service/DeskproService.php @@ -196,7 +196,7 @@ public function getTicketDepartments(array $query = [], $noFilter = FALSE) { if (!$noFilter) { // Filter out unavailable departments. - $availableIds = $this->config->getAvailableDepartments(); + $availableIds = $this->config->getAvailableDepartments() ?? []; $data = array_filter($data, function (array $department) use ($availableIds) { return in_array($department['id'], $availableIds);