From 8626a112d3d5e2e352ad6d13bed850fdf0d4c6ab Mon Sep 17 00:00:00 2001 From: Shubham Goel Date: Fri, 9 Jan 2026 20:03:27 +0530 Subject: [PATCH] DRCD-1999: Preview Functionality --- .../next/src/Plugin/Next/PreviewUrlGenerator/SimpleOauth.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/next/src/Plugin/Next/PreviewUrlGenerator/SimpleOauth.php b/modules/next/src/Plugin/Next/PreviewUrlGenerator/SimpleOauth.php index 1ec530724..106803f16 100644 --- a/modules/next/src/Plugin/Next/PreviewUrlGenerator/SimpleOauth.php +++ b/modules/next/src/Plugin/Next/PreviewUrlGenerator/SimpleOauth.php @@ -127,6 +127,9 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s public function generate(NextSiteInterface $next_site, EntityInterface $entity, string $resource_version = NULL): ?Url { $query = []; $query['path'] = $path = $entity->toUrl()->toString(); + if($resource_version) { + $query['path'] = $query['path'].'?resourceVersion='.$resource_version; + } // Create a secret based on the timestamp, path, scope and resource version. $query['timestamp'] = $timestamp = $this->time->getRequestTime();