Skip to content

Commit

Permalink
Merge pull request #19 from dennisinteractive/CMS-1772-link-checker-e…
Browse files Browse the repository at this point in the history
…rrors

CMS-1772 Link checker errors
  • Loading branch information
tashaharrison authored Mar 31, 2021
2 parents 17b4e59 + cdca2d3 commit 6b66438
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/CheckerQueriesManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 'node';
}
$entity_storage = $this->entityTypeManager->getStorage($type);
// Check the node exists, update the field and save.
if ($node = $entity_storage->load($id)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Dennis/Link/Checker/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions src/Dennis/Link/Checker/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public function run() {
}
$end = time() + $this->timeLimit;


// Remove any old items from the queue.
$this->prune();

Expand All @@ -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;
}
}

Expand Down

0 comments on commit 6b66438

Please sign in to comment.