I just created a test page here and had the query information from the request sent to me. I was unable to confirm that the vault_link wasn't updated - according to the query results I received, when creating a new page an UPDATE query was run using the correct information.
I think instead that there's something else going on here: that the link record is being created without reference to the existing target ID. After some more tests I see that links are being created correctly... so there are two ways to get records with an invalid target ID, when the target already exists (so it will not run an UPDATE query later):
- If the article cache record for the target was corrupt at the time the link is saved - that is, if you went to the target, it says "There is no text in this page." This may occur:
- If the link was made during the process for Rebuild Namespace, or Rebuild All URLs
- During import, if the import failed at some point, and another import was run over the top.
- If there were 2 copies of a page with that name, and one of them was deleted after the link was made.
In all of these cases the only solution is to wait for links to update, which they should do the next time the cache builds. You can expedite this, but not perform it manually: AdminCP > VaultWiki > Wiki Maintenance Tools > Clean Article Post Cache.
Since you fixed SPOT, I can't find another Wanted page on your site with the same problem of too many links.
The links that you see on our Wanted pages are remnants from other issues - since we test a lot of new things live here, we tend to corrupt our article cache every so often.
However, we are no longer using the target ID to make these queries in VaultWiki 4, so I am marking this issue as fixed for that release.