Problem/Motivation

I've enabled Link checker, set several fields to check for links. It's been enabled on production for a couple of months now. However, the status shows "31123 out of 20727 items have been processed." saying 150%.

It seems that this count does not update after the initial scan? One thing that we wanted to use though is the "Check link status" setting, disabling, and filtering out links based on this option. But re-analyzing content for links will reset this status, if I'm not mistaken.

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bburg created an issue. See original summary.

parasite’s picture

The linkchecker_entity_insert and linkchecker_entity_update puts every entites into linkchecker_index table without checking if it has links or not.

parasite’s picture

Oh, and besides the patch a re-analyzing is required indeed.

parasite’s picture

Status: Active » Needs review
Balu Ertl’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
90.94 KB

Now tested on our project and hereby I confirm that the patch shared in comment #2 does resolve the issue of displaying unreal number on progress bar via /admin/config/content/linkchecker page:

Comparison screenshots

Therefore RTBCʼing this issue.

C-Logemann’s picture

@parasite Thanks for providing a patch. If you want to push the review process you can create an issue fork and open a merge request.

C-Logemann’s picture

Title: Extraction Status - 150% - ??? » Wrong calulation of extraction status
Balu Ertl’s picture

Title: Wrong calulation of extraction status » Wrong calculation of extraction status
eiriksm’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs tests

The change makes sense, and the patch works well. However, would be great to have a test for this. Setting to needs review, so in case you good people agree with me, let's move this to needs work. If everyone disagree with that, we can set it back to needs work 😃️

Are you able to add a test as well, @parasite? I would be glad to help out if you need help 😃️

parasite’s picture

Maybe in my free time, but I'd rather say no. My effort was done in official working hours.

parasite’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Since there is no progress here for almost 2 months ago and no one was volunteering to make tests I think there no point of holding this back anymore. Community tested already and the applied changes are simple and straightforward. If there are no urls extracted on node updates/inserts there's no need to save anything and we don't need to update linkchecker index table.

C-Logemann’s picture

Status: Reviewed & tested by the community » Needs review

Thanks @parasite for creating a merge request which is sadly not being reviewed by someone else. At first the CI system is currently reporting "Not currently mergeable" on MR !11. So this needs to be checked etc. And please do not mark your own code contribution as "RTBC".

Also please do not remove the tag "Needs tests" if currently no one has currently the time to write one. Even when the code change above will be committed this issue should be open until there is an decision or an additional issue to discuss this.

C-Logemann’s picture

Issue tags: +Needs tests
C-Logemann’s picture

It's not easy to see why there was reported an error so this can eventually be ignored. The test situation is a nice to have but I think it's not a blocker to first add the fix and add the tests later.

parasite’s picture

Thanks for putting the tag back it was a mistake, sorry. And regarding RTBC, it was already RTBC 2 months ago, nothing has changed since then.

parasite’s picture

I am not familiar enough with this gitlab based vcs yet, @C_Logemann is there something that I can do to move this forward?

parasite’s picture

The first MR !11 was by mistake as it was basically empty without commits, and the 2nd one is passed so it should be ok.

parasite’s picture

@C_Logemann could you please also make sure that this ticket was RTBC'd in comment #5? Thank you.

C-Logemann’s picture

"RTBC" is just a status which is often be changed to "needs work" etc. in many drupal projects. In this case the community was only one reviewer. As a responsible maintainer I don't accept code changes even small ones just because of this status. So personally I need more time to test and decide or another maintainer find some time to do.

With using the new Gitlab way you already pushed the review process. It was easier for me to take a first look and it will be easier to implement in a test system.

But Everybody who need this code you contributed can use this e.g. via composer patch management.

parasite’s picture

Just as we did. Thanks for explanation.

eiriksm’s picture

Added a test for the bug. Test-only patch attached.

Status: Needs review » Needs work

The last submitted patch, 24: 3184613-test-only.patch, failed testing. View results

eiriksm’s picture

Status: Needs work » Needs review

The test in the pr passed, and the test only patch failed, proving we are testing what the patch fixes

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

codebymikey’s picture

Attached a patch which also applies the same check during batch runs.

edit: My assumption was wrong. Will try and address this when I get some time.

Status: Needs review » Needs work

The last submitted patch, 28: 3184613-linkchecker-extraction-status-28.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

codebymikey’s picture

eiriksm’s picture

Let's do a test only patch with the latest test changes from @codebymikey

Status: Needs review » Needs work

The last submitted patch, 31: 3184613-test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

eiriksm’s picture

Status: Needs work » Needs review

Great.

So if we can just get someone who has this problem to test the current patch (that would be #30), and of course a review would also be great.

Thank you to everyone who worked on this, let's get this done! 🙌️

eiriksm’s picture

Again, great if someone could either confirm this fixes their issue, or at least post a review? 🤓

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Worked like a charm

eiriksm’s picture

Great.

I am going to merge this and tag a new release. I think this is going to avoid several of the support and bug tickets we get in this issue queue 🤞🚀

  • eiriksm committed 870fe2e on 8.x-1.x
    Issue #3184613 by eiriksm, codebymikey, parasite, Balu Ertl: Wrong...
eiriksm’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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