diff --git a/src/Controller/ViewsBulkOperationsController.php b/src/Controller/ViewsBulkOperationsController.php index 3908916..8f87b06 100644 --- a/src/Controller/ViewsBulkOperationsController.php +++ b/src/Controller/ViewsBulkOperationsController.php @@ -9,6 +9,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessorInterface; use Drupal\user\PrivateTempStoreFactory; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Drupal\Core\Ajax\AjaxResponse; @@ -75,7 +76,12 @@ class ViewsBulkOperationsController extends ControllerBase implements ContainerI $this->deleteTempstoreData(); $this->actionProcessor->executeProcessing($view_data); - return batch_process($view_data['redirect_url']); + if ($view_data['batch']) { + return batch_process($view_data['redirect_url']); + } + else { + return new RedirectResponse($view_data['redirect_url']->setAbsolute()->toString()); + } } /** diff --git a/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php b/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php index 66d893f..fb35d14 100644 --- a/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php +++ b/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php @@ -794,6 +794,11 @@ class ViewsBulkOperationsBulkForm extends FieldPluginBase implements CacheableDe } // Routing - determine redirect route. + + // Set default redirection due to issue #2952498. + // TODO: remove the next line when core cause is eliminated. + $redirect_route = 'views_bulk_operations.execute_batch'; + if ($this->options['form_step'] && $configurable) { $redirect_route = 'views_bulk_operations.execute_configurable'; }