I’m not sure if you’ve got a script to show you the broken/unresolved links or not, so I just wanted to present one such script to you.
```dataviewjs
const basedata = Object.entries(dv.app.metadataCache.unresolvedLinks)
.filter(([origin, unresolved]) =>
Object.keys(unresolved).length)
// Build dictionary (or set) with key on the new file
let unresolvedDict = {}
for (let [origin, unresolvedList] of basedata) {
for (let newFile in unresolvedList) {
// If first time we see this, create an array...
if (!unresolvedDict[newFile])
unresolvedDict[newFile] = []
// Push another origin into the array
unresolvedDict[newFile].push(dv.fileLink(origin))
}
}
dv.table(["Unresolved", "Origin(s)"],
Object.entries(unresolvedDict)
.sort((a, b) => (a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1))
.map(item => [dv.fileLink(item[0]), item[1]])
)
```
If you run this script in some note, you’ll get a list of the unresolved links in the first column, and then the origin of the unresolved/broken link in the last column.
In other words, if you see something in the first column where it’s logically are missing the pipe character to make it into an alias, click on the origin link in the last column and edit the unresolved link. If there are multiple links in the last column for any given unresolved link, that means that you’ve linked from each of those origins.
To refresh the list you’ll sometimes need to either re-open the note with this query in it, or go to the previous file, and then forward again to this file, so that Dataviewjs can get a chance to redo the query. (Another option is to switch to editing mode, add a space somewhere in the query, and then go to reading mode. Yes, it’s a hack, but it does circumvent the no-refresh bug of dataview )
Hope this makes it a little easier to fix all the mangled links, due to the alias bug.