In _linkchecker_add_[node|comment|box]_links(), _linkchecker_cleanup_*_references() is never executed when $links is empty. So when there used to be links in a node, but the user removes all of them, _linkchecker_cleanup_*_references() is not called and the link references remain in the linkchecker_[node|comment|box] tables. This results in invalid entries in the Broken Links list.
It's probably enough to just place the calls to _linkchecker_cleanup_*_references() outside the if (!empty($links)) {} block to fix this?
Comments
Comment #1
hass commentedYeah, looks wrong... may need to be moved the bottom of the function and outside the if.
The cron cleanup will do this job otherwise after some time... aside - I need to re-think if the cron stuff could be removed now, too.
Comment #2
wimh commentedIt doesn't seem like the cron job will re-scan content, so how can it do this? It only removes link references for links that are no longer there (_linkchecker_cleanup_*_references). But to me it seems it should be the other way round: references (in linkchecker_[box|node] are populated by the content scanning, and links (in linkchecker_links) no longer having any references can be removed in cron?
Comment #3
hass commentedOh, yes... sorry for confusion.
Comment #4
hass commentedComment #5
hass commentedComment #6
hass commentedShould be fixed now.