Commit 487de770 authored by alexpott's avatar alexpott

Issue #2112895 by willzyx, swentel, drunken monkey: Wrong redirection in...

Issue #2112895 by willzyx, swentel, drunken monkey: Wrong redirection in admin/modules/uninstall/confirm if drupal is installed in a subdirectory
parent a92f9292
...@@ -135,7 +135,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -135,7 +135,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
// Prevent this page from showing when the module list is empty. // Prevent this page from showing when the module list is empty.
if (empty($this->modules)) { if (empty($this->modules)) {
return new RedirectResponse('/admin/modules/uninstall'); return $this->redirect('system.modules_uninstall');
} }
$data = system_rebuild_module_data(); $data = system_rebuild_module_data();
......
...@@ -106,5 +106,10 @@ function testUninstallPage() { ...@@ -106,5 +106,10 @@ function testUninstallPage() {
// Make sure our unique cache entry is gone. // Make sure our unique cache entry is gone.
$cached = \Drupal::cache()->get('uninstall_test'); $cached = \Drupal::cache()->get('uninstall_test');
$this->assertFalse($cached, 'Cache entry not found'); $this->assertFalse($cached, 'Cache entry not found');
// Make sure confirmation page is accessible only during uninstall process.
$this->drupalGet('admin/modules/uninstall/confirm');
$this->assertUrl('admin/modules/uninstall');
$this->assertTitle(t('Uninstall') . ' | Drupal');
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment