diff --git a/src/ResponsivePreview.php b/src/ResponsivePreview.php index 95a7aa5..3537dec 100644 --- a/src/ResponsivePreview.php +++ b/src/ResponsivePreview.php @@ -80,7 +80,7 @@ class ResponsivePreview implements ResponsivePreviewInterface { $url = NULL; if (!$this->routerAdminContext->isAdminRoute()) { - $url = $this->request->getRequestUri(); + $url = \Drupal::service('path.current')->getPath(); } else { // If we are on an edit-form, try to resolve the canonical url.