• Resolved webeno

    (@webeno)


    Broken Link Checker is finding many false positives following the move from one domain to another. During the move, I made changes to the db to replace all links to the old domain with the new one.

    When clicking on the pages to edit, it shows the new domain links, not the old ones, so the links are definitely not broken.

    Any reason why BLC would report on the old domain links?

    https://wordpress.org/plugins/broken-link-checker/

Viewing 10 replies - 1 through 10 (of 10 total)
  • If you changed the database directly, without going through WordPress, the plugin won’t know that the links have been replaced. Try this: go to Settings -> Link Checker -> Advanced and click the “Re-check all pages” button. Note that (re)checking the entire site may take a while.

    Explanation:

    For performance reasons, the plugin doesn’t continuously scan the database for changes. Instead, it hooks into WordPress in such a way that it gets notified whenever someone edits a post. This is faster, but it also means that it won’t notice edits that happen outside WP.

    Thread Starter webeno

    (@webeno)

    Sorry, I don’t quite get that. When making changes to wp_post, it’s pretty much like if I made the same changes through WordPress, so that doesn’t really explain to me why BLC would see those links. Where is it looking, not in the DB?

    Or are you saying these reports are ones that have been collected during those few minutes between the time I first uploaded the site, and my DB changes?

    What I did trying to correct this was that I selected “Not Broken” for all the detected links, then I clicked “re-check”. Next time I logged in the plugin found another post with an old link, though, again, this did not have the old link in it.

    When making changes to wp_post, it’s pretty much like if I made the same changes through WordPress, so that doesn’t really explain to me why BLC would see those links.

    It’s not quite the same. When you make a change through the WordPress UI, WordPress automatically notifies any interested plugins about the change. It does this using hooks, actions and filters. Specifically, updating a post triggers the save_post action.

    When you directly edit a wp_posts entry, you bypass that notification mechanism (you also bypass post revisions, any kind of input validation, and lots of other stuff that’s not relevant in this case). As a result, BLC won’t know about your change unless you notify it in some other way.

    Thread Starter webeno

    (@webeno)

    How do you explain the fact that BLC still found old links following a re-check?

    Also, are links marked as “Not Broken” ignored in the re-check?

    How do you explain the fact that BLC still found old links following a re-check?

    Did you click the “Re-check” option under a link, or the “Re-check all pages” button? The former just checks the link as-is, it doesn’t check the post that contains the link.

    Also, are links marked as “Not Broken” ignored in the re-check?

    They’re still checked, but normally they won’t get reported again unless the HTTP status code returned by the site changes for some reason (e.g. from 404 to 301).

    Thread Starter webeno

    (@webeno)

    I did “re-check” all pages, it still brought up one more with a link that was already changed in the db.

    You said “They’re still checked, but normally they won’t get reported again” – that doesn’t help me a lot, if I don’t know about the check.

    I now tried the “recheck” option on an individual link that was reported as broken, it said “wait…”, then changed again to “recheck”, and the link remained there in the list, with the “last checked” column emptying, nothing else changing.

    Note that all of these links now show up in the “All” tab, nothing is under “Broken (0) |Warnings (0) |Redirects (0) |Dismissed (0)”.

    I now selected all (15 links, even the ones that are 200 OK), and chose “Recheck” bulk action. It says they’re in the queue.

    How do I know when they’re finished? Can I not force it to be done there and then? No one is really using the site / db, so I am ok for it to run immediately.

    I did “re-check” all pages, it still brought up one more with a link that was already changed in the db.

    Hmm, that’s interesting. I’m not sure what could cause that.

    You said “They’re still checked, but normally they won’t get reported again” – that doesn’t help me a lot, if I don’t know about the check.

    Sorry, what do you mean you don’t know about the check? By default, each link is checked every 72 hours or so. You can change that in plugin settings. The “Settings -> Link Checker” page also includes a “status” field that shows how many links are still waiting to be checked.

    If you keep that page open, the plugin will keep processing links until the queue is empty.

    I now tried the “recheck” option on an individual link that was reported as broken, it said “wait…”, then changed again to “recheck”, and the link remained there in the list, with the “last checked” column emptying, nothing else changing.

    This “recheck” option checks the link immediately. That’s why it says “wait…” – as in, “please wait while the plugin checks this link”. Then it displays the response it got from the site. If trying to open the link URL produced the same result as before, it will look as if nothing changed.

    Note that all of these links now show up in the “All” tab, nothing is under “Broken (0) |Warnings (0) |Redirects (0) |Dismissed (0)”.

    That’s probably because you marked the links as “Not broken”. Among other things, this means they won’t show up under “Broken”.

    Thread Starter webeno

    (@webeno)

    OK, this is very confusing now, so let me try to clarify.

    1. What happens to links that I marked “Not Broken”, you said they’re checked but not reported. So what does that mean? The plugin checks them in the background, but doesn’t report about them anymore, unless their response changes?
    2. Going out from the above, if I do an individual “recheck” and nothing changes in the list, does that mean BLC detected them as broken again?
    3. Also going out form point 1, if I do a “recheck all”, then I see the queue emptying, but remaining with the same list as before, does that mean BLC still sees all of them being broken still?

    3+1. How can I clean this list (without touching the actual posts), and do a “fresh” recheck?

    Thanks.

    There’s one thing I should probably clarify before I answer your questions: when I say the plugin automatically checks a link, I mean that it looks at a link that it already knows about and tries to load the URL that it points to. The plugin does not re-examine the post that contains the link to see if the link URL has changed. That only happens when you edit a post in WP, click “re-check all pages”, or reinstall the plugin.

    1. What happens to links that I marked “Not Broken”, you said they’re checked but not reported. So what does that mean? The plugin checks them in the background, but doesn’t report about them anymore, unless their response changes?

    A couple of different things happen. First, since the link is no longer considered broken, it no longer shows up under “Broken”. It still shows up under “All” because that tab displays all links regardless of their state.

    The plugin continues automatically checking the link every 72 hours, just like with any other link. If the response is the same as when it was marked “not broken”, nothing happens. If the response is different, the “not broken” mark is cleared. Then it changes the link status to match the new response.

    For example, if a link is a 404, you mark it as “not broken”, and two weeks later the link URL starts responding with “500 Internal Server Error”, the plugin will report it as broken again.

    2. Going out from the above, if I do an individual “recheck” and nothing changes in the list, does that mean BLC detected them as broken again?

    Not necessarily. It just means the response the plugin got from the server was the same. If you manually marked the link as “not broken” before, it still counts as a working link.

    3+1. How can I clean this list (without touching the actual posts), and do a “fresh” recheck?

    Do you mean the “All” list? There are two ways to do that:

    1. Wait for the plugin to finish processing your links and click “Re-check all pages”.
    2. Deactivate, delete and then reinstall the plugin. This will remove and then recreate all plugin tables, which also clears the list.
    Thread Starter webeno

    (@webeno)

    Ok, “Re-check all pages” finally worked. Thanks for your patience, responsiveness, and help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WP move from one domain to another, finding false positives of internal links’ is closed to new replies.