diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 3da94957027fa190e5aeb5be81af580bc1311011..5a7c6307b455737b71403e1dc2e48a60456c4c7d 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -2492,8 +2492,6 @@ public function __sleep() { // state during unserialization. $this->serializationData = [ 'storage' => $this->storage->id(), - 'views_data' => $this->viewsData->_serviceId, - 'route_provider' => $this->routeProvider->_serviceId, 'current_display' => $this->current_display, 'args' => $this->args, 'current_page' => $this->current_page, @@ -2520,8 +2518,8 @@ public function __wakeup() { // Attach all necessary services. $this->user = \Drupal::currentUser(); - $this->viewsData = \Drupal::service($this->serializationData['views_data']); - $this->routeProvider = \Drupal::service($this->serializationData['route_provider']); + $this->viewsData = \Drupal::service('views.views_data'); + $this->routeProvider = \Drupal::service('router.route_provider'); // Restore the state of this executable. if ($request = \Drupal::request()) {