Place Details without a Place

Quote from Debbie B on 2021-07-24, 6:20 pmHello,
I ran this query on RM7 today using SQLite Expert Personal 5.4:
https://sqlitetoolsforrootsmagic.com/wp-content/uploads/2019/01/OrphanedPlaceDetails.sqlIt gave a nice list of Place details that are not associated with a Place.
Next I did Search > Find Everywhere for each of the orphaned place details, then deleted them from the results.
Under File > Database Tools, I ran all 4 tools with no errors.
I ran OrphanedPlaceDetails.sql again and it still shows the orphaned names, but they are listed as "null." There are also some blank place details.
I guess the orphans were not really removed from the database? Do I need to worry too much about it?
Hello,
I ran this query on RM7 today using SQLite Expert Personal 5.4:
https://sqlitetoolsforrootsmagic.com/wp-content/uploads/2019/01/OrphanedPlaceDetails.sql
It gave a nice list of Place details that are not associated with a Place.
Next I did Search > Find Everywhere for each of the orphaned place details, then deleted them from the results.
Under File > Database Tools, I ran all 4 tools with no errors.
I ran OrphanedPlaceDetails.sql again and it still shows the orphaned names, but they are listed as "null." There are also some blank place details.
I guess the orphans were not really removed from the database? Do I need to worry too much about it?

Quote from Tom Holden on 2021-07-24, 11:35 pmYes, you should worry that the path from Find Everywhere to deleting the Place Detail may have been faulty and you deleted some other Place. I just mimicked what you described and I could see that it was presenting me with the wrong place to delete. You should use the companion script found on Place Details without a Place to delete the unused orphaned Place Details. Both scripts are also in the application Bundled Utilities – RMtrix.
Yes, you should worry that the path from Find Everywhere to deleting the Place Detail may have been faulty and you deleted some other Place. I just mimicked what you described and I could see that it was presenting me with the wrong place to delete. You should use the companion script found on Place Details without a Place to delete the unused orphaned Place Details. Both scripts are also in the application Bundled Utilities – RMtrix.

Quote from Debbie B on 2021-07-25, 9:52 amThanks. I was very careful to pick the right place detail when doing Find Everywhere. The query report showed me which person and record number it belonged to, so I went there first (Edit Person) to fix that up before deleting in Find Everywhere.
Since backing up and restarting RM7, I see that most of the place details which I removed from the Find Everywhere window have appeared again in Find Everywhere, but they are no longer in the Edit Person window because I had removed it from there.
I'm not sure which one is the companion script that you mentioned.
RMtrix might be beyond my skills. When I clicked RMtrix64.zip dated 21 Jan 2013, it did not download; nothing happened.
Maybe Bruce will add a way to fix the problem in RM8.
Thanks. I was very careful to pick the right place detail when doing Find Everywhere. The query report showed me which person and record number it belonged to, so I went there first (Edit Person) to fix that up before deleting in Find Everywhere.
Since backing up and restarting RM7, I see that most of the place details which I removed from the Find Everywhere window have appeared again in Find Everywhere, but they are no longer in the Edit Person window because I had removed it from there.
I'm not sure which one is the companion script that you mentioned.
RMtrix might be beyond my skills. When I clicked RMtrix64.zip dated 21 Jan 2013, it did not download; nothing happened.
Maybe Bruce will add a way to fix the problem in RM8.

Quote from Tom Holden on 2021-07-25, 1:55 pmYou cannot delete a Place Detail record from Find Everywhere in RM7. It opens an edit dialog and you can change values on the record in the PlaceTable but Delete is not an option. I think you may have deleted the name but the record is still present.
Nor can the Place List find an orphaned Place Detail so you cannot delete the record from there, which is why you hear Tech Support suggest you drag'n'drop to a new database to clear out this detritus that RM sloppily leaves behind.
That's why I created these scripts in the first place. I trust you are reading the page Place Details without a Place to find the scripts and not simply searching in the Media Library. The companion script OrphanedPlaceDetails_DeleteUnused.sql
was right beside the one you used. I've edited the page to put it on a separate line.
To install RMtrix, please read the instructions on the page Bundled Utilities – RMtrix. If your browser did not start a download by clicking on the link, you might have to right-click on it and select Download from the menu. Then you need to unzip the file and run its setup.exe.
You cannot delete a Place Detail record from Find Everywhere in RM7. It opens an edit dialog and you can change values on the record in the PlaceTable but Delete is not an option. I think you may have deleted the name but the record is still present.
Nor can the Place List find an orphaned Place Detail so you cannot delete the record from there, which is why you hear Tech Support suggest you drag'n'drop to a new database to clear out this detritus that RM sloppily leaves behind.
That's why I created these scripts in the first place. I trust you are reading the page Place Details without a Place to find the scripts and not simply searching in the Media Library. The companion script OrphanedPlaceDetails_DeleteUnused.sql was right beside the one you used. I've edited the page to put it on a separate line.
To install RMtrix, please read the instructions on the page Bundled Utilities – RMtrix. If your browser did not start a download by clicking on the link, you might have to right-click on it and select Download from the menu. Then you need to unzip the file and run its setup.exe.

Quote from thejerrybryan on 2021-07-28, 3:56 pmI would agree that there is a high probability that you deleted a Place by accident instead of a Place Detail. The RM7 user interface for editing and deleting Places and Place Details is a death trap in this regard. Assuming you made a backup prior to conducting any of these activities, I would strongly recommend restoring your database and starting this cleanup over again. Then follow Tom's instructions to download both the script that produces a report and the script that deletes the orphaned Place Details.
Also, RMTrix should download fairly easily as long as your browser cooperates. And if your browser doesn't cooperate, kick it a little bit until it does. After it downloads, there is really nothing to install except in the sense that you have to unzip the zip file.
I would agree that there is a high probability that you deleted a Place by accident instead of a Place Detail. The RM7 user interface for editing and deleting Places and Place Details is a death trap in this regard. Assuming you made a backup prior to conducting any of these activities, I would strongly recommend restoring your database and starting this cleanup over again. Then follow Tom's instructions to download both the script that produces a report and the script that deletes the orphaned Place Details.
Also, RMTrix should download fairly easily as long as your browser cooperates. And if your browser doesn't cooperate, kick it a little bit until it does. After it downloads, there is really nothing to install except in the sense that you have to unzip the zip file.

Quote from Debbie B on 2021-07-29, 10:09 amThanks Tom and Jerry,
I was able to download RMTrix by right-clicking on it. It installed with no problems. I ran it on a test database and everything worked good. So I did the same on my real database. All the orphaned place details are now deleted after going to Places > Orphaned Place Details > Delete Unused.
In the Places > Errors report are still 3 "Unused Place Detail w/o Place" entries.
Going to the first one on the list in Edit Person, I deleted the fact (Probate) that was showing up on the error report (after having moved the source somewhere else). This unused place is still showing in the error report but now does not give me the RM person ID number.For the other two entries in the error report, I'm not able to tell which fact is giving the problem since I have so many facts with the same name (Event).
So I guess 3 leftovers aren't so bad, and I won't worry about it.
Thanks Tom and Jerry,
I was able to download RMTrix by right-clicking on it. It installed with no problems. I ran it on a test database and everything worked good. So I did the same on my real database. All the orphaned place details are now deleted after going to Places > Orphaned Place Details > Delete Unused.
In the Places > Errors report are still 3 "Unused Place Detail w/o Place" entries.
Going to the first one on the list in Edit Person, I deleted the fact (Probate) that was showing up on the error report (after having moved the source somewhere else). This unused place is still showing in the error report but now does not give me the RM person ID number.
For the other two entries in the error report, I'm not able to tell which fact is giving the problem since I have so many facts with the same name (Event).
So I guess 3 leftovers aren't so bad, and I won't worry about it.