search and replace links is not working with only invalid links selected #3058
Labels
🐛 bug
Something isn't working
❗ prio: medium
Should be scheduled in the forseeable future.
☺️ effort: low
Should be doable in <4h
Milestone
Describe the Bug
No links are getting replaced when only the
invalid links
checkbox is selected on the links search and replace view.Steps to Reproduce
Invalid Links
and make sure that no other checkboxes are selectedExpected Behavior
Invalid links matching the search should get replaced
Actual Behavior
They don't get replaced
Additional Information
This bug happens, because we compare the wanted link types (In this case ['invalid']) against the types of the urls. However, the type of an url only stores, if it is internal, or external, or a phone or email link. Technically, the type can be
invalid
, however that is only the case when the linkcheck library cannot determine what kind of link it is and has nothing to do whether it can be reached over the internet.Instead, we would have to manually check if a link is invalid.
The text was updated successfully, but these errors were encountered: