Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search and replace links is not working with only invalid links selected #3058

Open
david-venhoff opened this issue Sep 14, 2024 · 0 comments
Labels
🐛 bug Something isn't working ❗ prio: medium Should be scheduled in the forseeable future. ☺️ effort: low Should be doable in <4h
Milestone

Comments

@david-venhoff
Copy link
Member

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

  1. Go to Broken Links view
  2. Click on Search & Replace
  3. Select Invalid Links and make sure that no other checkboxes are selected
  4. Enter something into search and replace such that an invalid links should get changed
  5. Notice that nothing happened after link replacement

Expected 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.

@david-venhoff david-venhoff added 🐛 bug Something isn't working ❗ prio: medium Should be scheduled in the forseeable future. ☺️ effort: low Should be doable in <4h labels Sep 14, 2024
@david-venhoff david-venhoff added this to the 24Q4 milestone Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ❗ prio: medium Should be scheduled in the forseeable future. ☺️ effort: low Should be doable in <4h
Projects
None yet
Development

No branches or pull requests

1 participant