From a167dcb1a86a463e4d9574f0ad6a2ce3d0560dd9 Mon Sep 17 00:00:00 2001 From: Tasha Harrison Date: Wed, 24 Mar 2021 13:04:32 +0000 Subject: [PATCH 1/3] CMS-1772 type is actually bundle --- src/CheckerQueriesManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CheckerQueriesManager.php b/src/CheckerQueriesManager.php index 82721f9..17d3642 100644 --- a/src/CheckerQueriesManager.php +++ b/src/CheckerQueriesManager.php @@ -99,7 +99,7 @@ public function fieldGetDom($id, $type, $fieldName) { public function fieldSave($id, $type, $fieldName, $revisionId, $updatedText) { $updated = 0; // This is a fix for an edge case where the $type is article. - if ($type === 'article') { + if ($type === 'article' || $type === 'gallery') { $type = 'node'; } $entity_storage = $this->entityTypeManager->getStorage($type); From 84e5e610ec57ad1b5de8a77db30b0cf011743ac9 Mon Sep 17 00:00:00 2001 From: Tasha Harrison Date: Wed, 24 Mar 2021 13:18:48 +0000 Subject: [PATCH 2/3] CMS-1772 all items are nodes --- src/CheckerQueriesManager.php | 4 ---- src/Dennis/Link/Checker/Field.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/CheckerQueriesManager.php b/src/CheckerQueriesManager.php index 17d3642..8198a3c 100644 --- a/src/CheckerQueriesManager.php +++ b/src/CheckerQueriesManager.php @@ -98,10 +98,6 @@ public function fieldGetDom($id, $type, $fieldName) { */ public function fieldSave($id, $type, $fieldName, $revisionId, $updatedText) { $updated = 0; - // This is a fix for an edge case where the $type is article. - if ($type === 'article' || $type === 'gallery') { - $type = 'node'; - } $entity_storage = $this->entityTypeManager->getStorage($type); // Check the node exists, update the field and save. if ($node = $entity_storage->load($id)) { diff --git a/src/Dennis/Link/Checker/Field.php b/src/Dennis/Link/Checker/Field.php index 0eb0813..e00eb46 100644 --- a/src/Dennis/Link/Checker/Field.php +++ b/src/Dennis/Link/Checker/Field.php @@ -146,7 +146,7 @@ public function save() { $updated_text = Html::serialize($this->getDOM()); return $this->checker_managers->getCheckerQueriesManager()->fieldSave( $this->getEntity()->entityId(), - $this->getEntity()->entityType(), + 'node', $this->field_name, $this->revision_id, $updated_text From cdca2d347f3f24ad4778fb97cb1497be54233235 Mon Sep 17 00:00:00 2001 From: Tasha Harrison Date: Wed, 24 Mar 2021 14:58:44 +0000 Subject: [PATCH 3/3] CMS-1772 dont stop the link checker --- src/Dennis/Link/Checker/Processor.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Dennis/Link/Checker/Processor.php b/src/Dennis/Link/Checker/Processor.php index c1a0d00..07f71d9 100644 --- a/src/Dennis/Link/Checker/Processor.php +++ b/src/Dennis/Link/Checker/Processor.php @@ -100,7 +100,6 @@ public function run() { } $end = time() + $this->timeLimit; - // Remove any old items from the queue. $this->prune(); @@ -113,9 +112,8 @@ public function run() { try { $more = $this->doNextItem(); } catch (RequestTimeoutException $e) { - // Don't try to process any more items for this run. + // Log the timeout, but keep going. $this->config->getLogger()->warning($e->getMessage()); - return FALSE; } }