Skip to content
Snippets Groups Projects
Commit 3465f9c1 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
parent acd9aa03
No related branches found
No related tags found
2 merge requests!11197Issue #3506427 by eduardo morales alberti: Remove responsive_image.ajax from hook,!10223132456: Fix issue where views instances are emptied before an ajax request is complete
Pipeline #413643 passed with warnings
Pipeline: drupal

#413646

    ......@@ -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