Skip to content
Snippets Groups Projects
Commit 315c9087 authored by catch's avatar catch
Browse files

Issue #3486797 by alecsmrekar, shalini_jha, smustgrave, amateescu: Updating...

Issue #3486797 by alecsmrekar, shalini_jha, smustgrave, amateescu: Updating path alias language in workspace does not work

(cherry picked from commit 3465f9c1)
parent dd702482
No related branches found
No related tags found
8 merge requests!11515Issue #3480419 by mondrake, smustgrave, catch: Method...,!11380Issue #3490698 by catch, spokje: Bump MINIMUM_STABILITY back to 'stable' when...,!11281Use Drupal Core Leadership terminology in MAINTAINERS.txt,!11239Issue #3507548: Allow workspace changes listing to show all items, without a pager,!11238Fix issue #3051797,!11213Issue #3506743 by tomislav.matokovic: Increasing the color contrast for the navigation block title against the background of the navigation sidebar to at least 4.5:1,!11147Draft: Try to avoid manually setting required cache contexts,!11108Issue #3490298 by nicxvan: Profiles can be missed in OOP hooks
Pipeline #413677 canceled
Pipeline: drupal

#413678

    ......@@ -44,7 +44,7 @@ protected function getBaseQuery() {
    $wa_join = $query->leftJoin('workspace_association', NULL, "[%alias].[target_entity_type_id] = 'path_alias' AND [%alias].[target_entity_id] = [original_base_table].[id] AND [%alias].[workspace] = :active_workspace_id", [
    ':active_workspace_id' => $active_workspace->id(),
    ]);
    $query->innerJoin('path_alias_revision', 'base_table', "[%alias].[revision_id] = COALESCE([$wa_join].[target_entity_revision_id], [original_base_table].[revision_id]) AND [%alias].[langcode] = [original_base_table].[langcode]");
    $query->innerJoin('path_alias_revision', 'base_table', "[%alias].[revision_id] = COALESCE([$wa_join].[target_entity_revision_id], [original_base_table].[revision_id])");
    $query->condition('base_table.status', 1);
    return $query;
    ......
    ......@@ -198,6 +198,9 @@ public function testPathAliasesWithTranslation(): void {
    $this->assertAccessiblePaths([$default_path, $translation_path]);
    // Verify the default alias is available in the live workspace.
    $this->assertAccessiblePaths([$default_path]);
    $this->switchToWorkspace($stage);
    $this->assertAccessiblePaths([$default_path, $translation_path]);
    ......@@ -311,6 +314,21 @@ public function testPathAliasesWithTranslation(): void {
    $stage->publish();
    $this->assertAccessiblePaths([$default_path, $new_stage_translation_path]);
    $this->assertNotAccessiblePaths([$stage_translation_path]);
    // Switch back to Stage.
    $this->switchToWorkspace($stage);
    // Edit the path alias to set its language to "Not specified".
    $alias_edit_path = "admin/config/search/path/edit/{$default_node->id()}";
    $this->drupalGet($alias_edit_path);
    // Set the alias language to "Not specified".
    $edit = [
    'langcode[0][value]' => 'und',
    ];
    $this->submitForm($edit, 'Save');
    // Verify the path alias is still available in the Stage workspace.
    $this->assertAccessiblePaths([$default_path]);
    }
    /**
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment