"PHantom" keyword

Status
Not open for further replies.

stephenarfer

New Member
Premium Classic Member
Premium Cloud Member
Joined
Jun 19, 2020
Messages
2
Lightroom Version Number
V9.2.1
Operating System
  1. Windows 10
Hello all - My first posting as a new member
I have a frustrating issue with my Lightroom Classic installation. I have used LR since the very early days and not unnaturally after some 43,000 retained images, I ended up with an illogical keyword structure. I just recently spent a few days regularising my default keywords and have ended up with an odd problem.
I know that I used to have a keyword "Parvin" (my partner) and I recently changed all family names to include surnames, so as far as I remember, I changed "Parvin<Family" to "Parvin Lindley<Family". That worked and I thought that would be the end of it. However ever since then, when I try and allocation "Parvin Lindley", I get a drop-down with the old "Parvin" included. "Parvin" is not in the keyword list and if I try and allocate it to an image I get the error "An internal error has occurred: can't apply this tag to this image".
I have exported the keyword list to a text file and there is no "Parvin". I tried adding a root "Parvin", importing the file and then deleting it in Lightroom, but made no difference. Recent upgrades to LR classic had no influen
Clearly this is not a show stopper, but both intriguing and irritating.
I reckon that "Parvin" is still in the relevant lightroom database table, but I don't know how to get direct access to the database, or what the relevant linked table would be .
Does anyone have any ideas?
Parvin keyword selection.jpg
Parvin keyword error.jpg
 
This dropdown list is a suggestion list based upon recently used Keywords. They may not exist in your current keyword list especially if you have been "regularizing". AFAIK these are not stored in the catalog. The may be stored in preferences but I doubt that such a large list would be found there. Eventually "Parvin" will roll off the list,
 
I've just solved my own question. Googling "lightroom catalog format" turned up the information that the .lrcat file is a SQLite database. So ,using "SQLite Studio" database client I opened the database and looked for "keyword" in the list of tables. It didn't take long to discover that all keywords are stored in the table "AgLibraryKeyword". On examining the data, I found that "Parvin" was indeed in the table and a unique index field "parent" was in fact NULL. This should be impossible and accounts for the error message I had been receiving in Lightroom. I deleted the record and on opening LR I found that when keywording an image, I got as far as "pa" to discover that "Parvin" had indeed disappeared for good. Problem solved and a lesson learnt.

This circumstance must date back to a table corruption at some time in the past. There is no way that the "parent" field could legitimately be null. The table structure disallows null in what is a key index field. How did it happen? - Beats me,
 

Attachments

  • All null records.txt
    75 bytes · Views: 222
  • Query result.jpg
    Query result.jpg
    18 KB · Views: 186
Good work. :)
 
There is no way that the "parent" field could legitimately be null. The table structure disallows null in what is a key index field. How did it happen? - Beats me,
It has been some time since I opened the Lightroom Catalog in a SQLlite database manager. but top level keyword have no parent but can be the parent to other keywords. This is how Lightroom builds a keyword hierarchy. I think it might be possible that there were two Parvin keywords. One at the top level and one at the sub level of family. You only looked for where you thought it should be.

If you export an image and reimport the exported file, the keywords come back as a flat structure
Look at this keyword list. All of the place names are children of the keyword Locale and came back in as flat when I imported the images that contained them. So they appear twice in my keyword list that needs a lot of clean up.
1593729439404.png
 
I've just solved my own question. Googling "lightroom catalog format" turned up the information that the .lrcat file is a SQLite database. So ,using "SQLite Studio" database client I opened the database and looked for "keyword" in the list of tables. It didn't take long to discover that all keywords are stored in the table "AgLibraryKeyword". On examining the data, I found that "Parvin" was indeed in the table and a unique index field "parent" was in fact NULL. This should be impossible and accounts for the error message I had been receiving in Lightroom. I deleted the record and on opening LR I found that when keywording an image, I got as far as "pa" to discover that "Parvin" had indeed disappeared for good. Problem solved and a lesson learnt.

This circumstance must date back to a table corruption at some time in the past. There is no way that the "parent" field could legitimately be null. The table structure disallows null in what is a key index field. How did it happen? - Beats me,
Good work!
I consider modifying the database as higher school guru work
 
Good work!
I consider modifying the database as higher school guru work

Modifying the LrC database outside of Lightroom without understanding the table dependencies and indexes can corrupt your catalog. I would recommend working on a copy before replacing your master catalog with your altered file.


Sent from my iPad using Tapatalk
 
Status
Not open for further replies.
Back
Top