From efb0b002134305db2aa701ea1a4fee29b0cebee4 Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Thu, 28 Sep 2023 20:00:49 +1000 Subject: [PATCH 1/4] Drupal 11 compatibility. --- modules/quant_api/quant_api.info.yml | 2 +- modules/quant_cron/quant_cron.info.yml | 2 +- modules/quant_purger/quant_purger.info.yml | 2 +- modules/quant_purger/src/StackMiddleware/UrlRegistrar.php | 2 +- modules/quant_search/quant_search.info.yml | 2 +- modules/quant_sitemap/quant_sitemap.info.yml | 2 +- modules/quant_tome/quant_tome.info.yml | 2 +- modules/quant_webform/quant_webform.info.yml | 2 +- quant.info.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/quant_api/quant_api.info.yml b/modules/quant_api/quant_api.info.yml index 4e8d0b8f..48ce4885 100644 --- a/modules/quant_api/quant_api.info.yml +++ b/modules/quant_api/quant_api.info.yml @@ -3,7 +3,7 @@ description: Connect to the hosted Quant service package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 configure: quant_api.settings_form dependencies: - drupal:quant diff --git a/modules/quant_cron/quant_cron.info.yml b/modules/quant_cron/quant_cron.info.yml index 61fe1670..6b358c31 100644 --- a/modules/quant_cron/quant_cron.info.yml +++ b/modules/quant_cron/quant_cron.info.yml @@ -3,7 +3,7 @@ description: Run Quant tasks during cron package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 configure: quant_cron.settings_form dependencies: - quant:quant_api diff --git a/modules/quant_purger/quant_purger.info.yml b/modules/quant_purger/quant_purger.info.yml index 5c819d3c..f5798fd9 100644 --- a/modules/quant_purger/quant_purger.info.yml +++ b/modules/quant_purger/quant_purger.info.yml @@ -3,7 +3,7 @@ description: Cache tag purger for Quant. package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 dependencies: - quant:quant diff --git a/modules/quant_purger/src/StackMiddleware/UrlRegistrar.php b/modules/quant_purger/src/StackMiddleware/UrlRegistrar.php index 396584a5..b58e069b 100644 --- a/modules/quant_purger/src/StackMiddleware/UrlRegistrar.php +++ b/modules/quant_purger/src/StackMiddleware/UrlRegistrar.php @@ -57,7 +57,7 @@ public function __construct(HttpKernelInterface $http_kernel, TrafficRegistryInt /** * {@inheritdoc} */ - public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) { + public function handle(Request $request, $type = self::MAIN_REQUEST, $catch = TRUE) { $response = $this->httpKernel->handle($request, $type, $catch); if ($this->determine($request, $response)) { $this->registry->add( diff --git a/modules/quant_search/quant_search.info.yml b/modules/quant_search/quant_search.info.yml index 9baa8515..8ce0090f 100644 --- a/modules/quant_search/quant_search.info.yml +++ b/modules/quant_search/quant_search.info.yml @@ -3,7 +3,7 @@ description: 'Allows creation of Quant Search pages.' package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 configure: quant_search.main dependencies: - drupal:quant diff --git a/modules/quant_sitemap/quant_sitemap.info.yml b/modules/quant_sitemap/quant_sitemap.info.yml index 824fb56b..927b0f10 100644 --- a/modules/quant_sitemap/quant_sitemap.info.yml +++ b/modules/quant_sitemap/quant_sitemap.info.yml @@ -3,7 +3,7 @@ description: Quant simple_sitemap support package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 dependencies: - quant:quant_api diff --git a/modules/quant_tome/quant_tome.info.yml b/modules/quant_tome/quant_tome.info.yml index 34a285ac..64b4edb3 100644 --- a/modules/quant_tome/quant_tome.info.yml +++ b/modules/quant_tome/quant_tome.info.yml @@ -3,7 +3,7 @@ description: 'Deploy Tome static output to Quant.' package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 dependencies: - tome:tome_static diff --git a/modules/quant_webform/quant_webform.info.yml b/modules/quant_webform/quant_webform.info.yml index 64b4b768..0f3eba86 100644 --- a/modules/quant_webform/quant_webform.info.yml +++ b/modules/quant_webform/quant_webform.info.yml @@ -3,7 +3,7 @@ description: Quant Form support for Webform package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 dependencies: - quant:quant diff --git a/quant.info.yml b/quant.info.yml index 2491401e..f05ac1b3 100644 --- a/quant.info.yml +++ b/quant.info.yml @@ -3,7 +3,7 @@ description: Quant content export package: Quant type: module -core_version_requirement: ^9.3 || ^10 +core_version_requirement: ^9.3 || ^10 || ^11 configure: quant.config dependencies: - quant:quant_api From 1f82346963a9fc209571b622209d4bad36dc1a59 Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Thu, 28 Sep 2023 20:28:29 +1000 Subject: [PATCH 2/4] Add empty validateForm to prevent fatal error. --- modules/quant_api/src/Form/SettingsForm.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/quant_api/src/Form/SettingsForm.php b/modules/quant_api/src/Form/SettingsForm.php index 1136eb0c..c6a427f7 100644 --- a/modules/quant_api/src/Form/SettingsForm.php +++ b/modules/quant_api/src/Form/SettingsForm.php @@ -104,6 +104,12 @@ public function buildForm(array $form, FormStateInterface $form_state) { return parent::buildForm($form, $form_state); } + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state) { + } + /** * {@inheritdoc} */ From 4bb801fe4ee8771da07471f1016c6fd27e07faec Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Wed, 3 Jan 2024 20:41:56 -0800 Subject: [PATCH 3/4] Worked around issue with responsive image paths. --- src/Plugin/QueueItem/FileItem.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Plugin/QueueItem/FileItem.php b/src/Plugin/QueueItem/FileItem.php index 08d0ca81..8a152da9 100644 --- a/src/Plugin/QueueItem/FileItem.php +++ b/src/Plugin/QueueItem/FileItem.php @@ -25,6 +25,12 @@ public function __construct(array $data = []) { $this->file = $data['file']; $this->url = $data['url'] ?? NULL; $this->fullPath = $data['full_path'] ?? NULL; + + // Handle responsive images by removing extraneous data like ` 1x`. + if ($this->fullPath) { + $tmp = explode(' ', $this->fullPath, 2); + $this->fullPath = $tmp[0]; + } } /** From 10755ff44680bdf1c73bbe58038fb27445298ab6 Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Sun, 7 Jan 2024 14:33:59 -0800 Subject: [PATCH 4/4] Added todo for infrastructure fix. --- src/Plugin/QueueItem/FileItem.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Plugin/QueueItem/FileItem.php b/src/Plugin/QueueItem/FileItem.php index 8a152da9..450a99e2 100644 --- a/src/Plugin/QueueItem/FileItem.php +++ b/src/Plugin/QueueItem/FileItem.php @@ -27,6 +27,7 @@ public function __construct(array $data = []) { $this->fullPath = $data['full_path'] ?? NULL; // Handle responsive images by removing extraneous data like ` 1x`. + // @todo Fix this in the Quant infrastructure. if ($this->fullPath) { $tmp = explode(' ', $this->fullPath, 2); $this->fullPath = $tmp[0];