Problem/Motivation

The "fail count" for links is still going up, despite having set "test link" for those links to FALSE.

Steps to reproduce

  1. Add a node with a link in the body. Make the link redirect or an invalid link.
  2. Configure link checker to run with cron.
  3. Run cron's link checker process
  4. The link will fail
  5. Visit the "broken links" report, edit the link, and uncheck "Check link status". Save.
  6. Run cron's link checker process
  7. The link will fail again, making the fail count go up (as seen in the broken links report).

Proposed resolution

See MR !64.

Note that MR !63 is closed, and the "Not currently mergeable." result is for that MR, which was pointing at the wrong branch.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#11 linkchecker-3386764-m64.patch3.79 KBsolideogloria
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

solideogloria created an issue. See original summary.

solideogloria’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

solideogloria’s picture

Status: Active » Needs review

Everything is backwards compatible. Queued links will no longer be checked if unpublished, and unpublished links will not be queued anymore. Links tested manually with ->check() will still be checked, even if unpublished. The function returns a Promise, and returning early would break BC and require more changes.

I created a test for this fix. There is a failing test related to a "Save" button when I run them locally, but it's also failing on dev, and it's not related to these changes.

Also, could a maintainer please set 2.0.x as the default branch? (I accidentally created MR 63 because the older branch is still the default for some reason.)

solideogloria changed the visibility of the branch 3386764-links-with-test to hidden.

solideogloria changed the visibility of the branch 3386764-links-with-test to active.

solideogloria’s picture

Issue summary: View changes
solideogloria’s picture

Issue summary: View changes
solideogloria’s picture

StatusFileSize
new3.79 KB

Here's a patch of the changes.

solideogloria’s picture

Title: Links with "test link" set to FALSE are still being checked. » Unpublished links (test link = FALSE) should not be checked.
joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

I echo what @solideogloria said in #6 about the default branch but you can change it retroactively.

Anyways this looks great and is what I'd expect it to be doing, it's ready to be committed.

eiriksm made their first commit to this issue’s fork.

eiriksm’s picture

Status: Reviewed & tested by the community » Fixed

Awesome 👍♥️

eiriksm’s picture

I think I managed to change the default branch now as well ✌️

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.