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
Add warning category to broken link checker #1695
Comments
I would like to catch this issue. I would add them to the fixtures. And where are the links saved (db-table)? |
We use django-linkcheck for this tasks, this library ships two models:
Please do not include the real life example links below into our fixtures, they are just for local testing purposes. Instead, I would recommend to use https://httpstat.us/ for the fixtures... you can e.g. generate links like:
(Only adding the
Some example links for the warning category: "Broken external hash anchor"When the message is "Broken external hash anchor", the link usually works, some examples:
So the intention of this warning category would be to encourage content creators to either fix the anchor or remove everything after the "301 Moved Permanently" and "302 Found"When the message is "301 Moved Permanently" or "302 Found", the link also works, but is just a redirect...
So content creators could replace the link with the new target to avoid the redirect (which might e.g. be removed in the future, who knows)... One thing I didn't get is why most of the times the status is But again I'm not sure why... "403 Forbidden"These kind of errors are difficult to assess - sometimes, the error is justified, e.g.:
and sometimes, this is just because the link target recognizes our link checker as bot and denies access, even if the link works for normal users:
So for the 403 status code, I'm undecided whether we should really put this into the "warning" category or keep the current solution of giving the user the option to re-check or ignore the link at any given time if they notice that they are in fact working... |
@Gaston69 It appears that this is a problem of the underlying library and not us. |
For reference, see the following issues in the linkcheck library:
After these two have been resolved, the only case that remains is "403 Forbidden", but as I stated earlier, I think we should still leave these cases for the manual review instead of marking all those URLs as potentially valid. |
Motivation
For some pages the link checker shows an error, even though the page technically works for users. For this reason, a warning category should be added.
Proposed Solution
Add a warning category which should include the following links:
The text was updated successfully, but these errors were encountered: