Some Source citations entries are showing more times used than actually used

It seems I have phantom records on source citations. I will have linked to 3 facts but in total number it will show more times and there is not a consistent number in these it errors over actual number used. I have used every tool available to “clean” up this problem, to no avail. They only way to fix that I have found is to delete the source citation entry and rebuild. When I have done this it seems to permanently fix. I have too many of these to do this cumbersome fix. Suggestions???

1 Like

Not sure exactly what you mean – but delete should not be the way to fix.
If you are only creating / linking citations manually that should rule out issues related to to treeshare. Not clear if you mean Sources / Citations or citation link counts.

do you have any screenshots of what you mean?

I am not using tree share. That is not an issue with this problem. As example I use Findagrave as the Source, then I list each person as a citation and attach that citation to each fact it covers, i.e. birth, death, burial, name, etc. But on some of these the number I have attached will show I attached to a different number than it actually is and it is always a higher number than I have. I hope this is detailed enough to understand.

I agree we need screen shots on this one. The source counts and citation counts are not an area of RM8/9 where I have ever encountered problems.

Here are some questions.

  • Are the counts incorrect for sources or for citations or for both?
  • Are you memorizing and pasting citations? If so, do you paste with reuse or paste with copy?
  • Have you run the Merge All Duplicate Citations tool?
  • If it is citations with the incorrect counts, have you clicked on the “Citation Used” line to slide in a list of where the citation has been used? If so, is the list correct, and does the list match the “Citation Used” count that you slid in? This is where screen shots would be especially useful.

Here are examples of what I’m talking about. My number if citations matches with the actual citations.

Thanks for posting. That is really, really strange and I have no explanation. I can’t picture any scenario under which it could happen and I can’t recreate it.

Unless somebody has a better idea, I think you need to submit your database RM for analysis.

1 Like

Trying to think of something that would cause that – and usually Jerry can find something. Would anything like a duplicate fact or shared fact cause that? I do know when citations are copy vs reused the counts might be different than expected

Did you try running the database tools, and the merge all sources and citations? Test using drag n drop into a new blank database and see what happens to the counts.

Earlier versions of RM were known to not clean up properly after a deletion or merge. I don’t doubt the possibility that the latest version fails to do so in some cases. One very obvious condition would be a program crash upon deleting a person or fact. Even if RM normally cleared the CitationLinkTable of the associated record, a crash before that has succeeded would leave it in place and would count as a Citation ‘use’.


Debra, I notice that you had a similar post back in 2022 related to citation issues in your RM8 db. Is the current issue occurring in the same database?

Renee drag and drop one person or ??. And yes I have run tools a number of times.

Drag n drop everyone in the database.

Well that took care of phantom numbers BUT I lost over a years worth of getting people into groups. If this is the solution I am saying thanks but no thanks!!

Drag’n’drop is a sledgehammer tool that crushes a lot more than a few phantom records that Delete Phantoms should be capable of removing.

If you use color code sets for the groups you can quickly rebuild them based on sets and colors. The color sets are preserved but you will need to import the color code sets for the labels. Go to File, Import Data, Import Lists to import them.

I have the exact same issue. I find that if it remove a citation from the list on the right, it disappears from this list, but the Used number in the left list does not change.

I may be missing something obvious, but I don’t think that the behavior you describe is a re-creation of the problem. Unlinking a citation from an object such as a person, family, or fact will reduce the Used count but it will have no effect on the Citations count. That’s is normal behavior, and it is a natural consequence of RM9’s support for reusable citations.

Rather, the problem is that the Use Count can be something like 5, but when you try to look at those 5 uses you might see only 3 uses. The 2 missing uses appear to be entries in the CitationLinkTable that link to a person, family, or fact that doesn’t exist.

Quite right, Jerry. The number of times that a source has been cited and the number of times that a specific citation have been used are two separate things. I am embarrassed for confusing the issue. Thanks for catching my error; I deleted the post to avoid confusion.

As my friends enjoy reminding me, “the problem is in front of the keyboard” … <again>.

I have continued to investigate the issue of phantom citation links. In the process, I have discovered that I have two phantom citation links in my own database. Except in my case, the citations counts are correct and yet I have two citation links that point to nothing. This message is not intended as a final resolution, but rather as in interim status report.

I started by planning to develop two SQLite scripts. The first script would be to display any phantom citation links and the second script would be to delete any phantom citation links. I fully expected that my database would not have any phantom citation links. I therefore expected that for the purposes of testing, I would need to introduce some phantom citation links into my database using SQLite. And obviously this would be taking place in a test database which is a copy of my production database rather than actually being in my production database.

Much to my surprise, I did have two phantom citation links and I did not need to introduce any phantom links artificially to test my SQLite scripts.

Here is what the “Used” screen looks like for the citation with the phantom links. The phantom occurred for a living person, so I redacted the dates.

What it looks like is that there are two citation links for the Birth fact and two citation links for the Marriage Record fact. But in each case, one of the links is real and one of the links is phantom. Using SQLite, I can see that the phantom links are to records in the EventTable that don’t exist.

If you click on the Edit icon (the crayon or pencil icon) for the real link to the Birth fact, you go to the Edit Person screen for Floyd Dean Wilburn, which I won’t show because all is well. If you go to the phantom link to the Birth fct, here is what you see. It’s an empty Edit Person screen. The only way to determine which is the real citation link and which is the phantom citation link is to click on the Edit icon for each link in turn. Here is what you see when you click on the Edit icon for the phantom link.

It turns out that nothing in RM9 caused this situation. Rather, it was imported from RM7.; Here is a screen capture for the same data from RM7. There are two main differences. One difference is that I share the main Marriage fact with the two parties to the marriage with a role of Individual Marriages. The citations for those roles show up in RM7’s display and they do not show up in RM9’s display. This is an opportunity for an enhancement in RM9. The other difference is that it’s possible to distinguish between the real citation link and the phantom citation link. Namely, the real citation link for the Birth fact says (Birth) and the phantom citation link says (Birth) (Birth). The same is true for the real and phantom link to the Marriage Record fact.

The person who has the phantom citation link was last edited 21 Apr 2019. That’s when I entered the citation and the data entry was in RM7. I assume the phantom links happened on that date, but I suppose it could have been later. I have no idea what possibly could have happened to have caused the phantom links. In any case, the phantom links were faithfully imported from RM7 in to RM9. That doesn’t mean that phantom citation links can’t happen in RM9. It simply means that my phantom links happened in RM7 and were imported into RM9.

In the meantime, I shall continue further to develop my two scripts to find and to repair such phantom citation links. I will post them to Tom’s SQlite site when I am done. I would urge RM to include a repair for phantom citation links in the Clean Phantom Records tool. The repair script will be very short and simple and it will run extremely quickly with the time being a few milliseconds at most.


My scripts are complete and have been posted to Tom’s site. There are four scripts in all - two for RM7 and two for RM9, where one script for each version of RM displays the phantom citation links and the other script for each version of RM deletes the phantom citation links.

I offer the delete script for RM9 here for an example of how it can be done. It is my hope and wish that something like this can be added to RM’s Clean Phantom Records tool. The script handles phantom citations for individuals, for families, for events, and for events. It does not handle phantom citations for tasks or for associations.

delete_phantom_citation_link_9.sql  (RM9 version)
Jerry Bryan    6/18/2024

Deletes citation links in CitationLinkTable which
are phantom.

DELETE FROM CitationLinkTable
FROM CitationLinkTable AS CL 
LEFT JOIN PersonTable AS P ON P.PersonID = CL.OwnerID
WHERE CL.OwnerType = 0 AND P.PersonID IS NULL


FROM CitationLinkTable AS CL 
LEFT JOIN FamilyTable AS F ON F.FamilyID = CL.OwnerID 
WHERE CL.OwnerType = 1 AND F.FamilyID IS NULL


FROM CitationLinkTable AS CL
LEFT JOIN EventTable AS E ON E.EventID = CL.OwnerID
WHERE CL.OwnerType = 2 AND E.EventID IS NULL


FROM CitationLinkTable AS CL
LEFT JOIN NameTable AS N ON N.NameID = CL.OwnerID
1 Like