# A keyword bug?



## AlisonTB (Feb 17, 2021)

Hello all:

I've noticed for some time a strange keyword. "Exercise" shows up all over the place, even though it's not in my keyword list. Also, it sucks up other keywords and nests them under it. When I click on a image and see Alcatraz<exercise, there are no check marks next to anything but Alcatraz (or below) in my keyword list. If I search for "exercise" tons of irrelevant images show up, but again there are no check marks in the keyword list to tell me where this word is hiding out. 
Anyone else have this issue with a keyword? 

Alison


----------



## Califdan (Feb 17, 2021)

Very strange.  what happens if you type "exercise" into the keyword list filter?


----------



## AlisonTB (Feb 17, 2021)

all sorts of images come up, but no check marks next to any "exercise' word I can find.  this has been going on for many months, I just started to track it down seriously. Maybe the thing where new keywords get nested under an existing one? I can't remember where that button is though...


----------



## AlisonTB (Feb 17, 2021)

AlisonTB said:


> all sorts of images come up, but no check marks next to any "exercise' word I can find.  this has been going on for many months, I just started to track it down seriously. Maybe the thing where new keywords get nested under an existing one? I can't remember where that button is though...


----------



## Califdan (Feb 18, 2021)

You misunderstood.  I'm not asking about the "filter images tool above the grid, but rather the filter on the actual list of keywords.  It's the line right below the "keyword list" panel header.  typing something there limits the list of keywords shown in the keyword list to only those keywords that match what you type along with their parent keywords.  I want to see how many occuranes of  the "Exsercise" keyword exist in the keyword list and under what parents.


----------



## Johan Elzenga (Feb 18, 2021)




----------



## AlisonTB (Feb 18, 2021)

Califdan said:


> You misunderstood.  I'm not asking about the "filter images tool above the grid, but rather the filter on the actual list of keywords.  It's the line right below the "keyword list" panel header.  typing something there limits the list of keywords shown in the keyword list to only those keywords that match what you type along with their parent keywords.  I want to see how many occuranes of  the "Exsercise" keyword exist in the keyword list and under what parents.


Ok yes, I tried that and lots of dif

ferent images showed up, including ones I took just yesterday. I can't drop down the keyword list when doing this though. I appreciate your help!


----------



## Johan Elzenga (Feb 18, 2021)

I think you misunderstand this again. Filtering the keyword list does just that: it filters what the keyword list shows. Your screenshot suggests that the keyword list does indeed not contain any keyword ‘exercise’. That is very odd. The plot thickens... I wonder if this could somehow be caused by a synonym ‘exercise’ rather than a keyword ‘exercise’.


----------



## AlisonTB (Feb 18, 2021)




----------



## rob211 (Feb 18, 2021)

Try entering "exercise" in Keyword *List*. Not "keywording," suggestions or set. It should show the prevalence of "exercise" across all images. It will make it easier to diagnose the problem, rather than looking at one image.


----------



## Califdan (Feb 18, 2021)

It's really annoying when you get old and forget stuff, but a vaguely recall a problem where in the database (i.e. the catalog) the root entry of the keyword list tree had a problem.   But for the life of me I can't recall what the problem was but something tells me that it should have been blank (only pointers and surrogate keys - no "name") but instead had some text in it.  almost like a none root keyword lost its place in the chain by acquiring a null value in the parent keyword ID field.     

I do recall opening a copy of the catalog using a database inquiry tool in my browser (which I don't recall how to do at the moment) and eventually finding the keywords area but beyond that I'm drawing a blank.  BTW, this was a long time ago, maybe LR/4 or thereabouts.

Again, I may be delusional on this.    Alison, can you look through your list of Keywords to see if it looks like whole branches may be missing or there is any strangeness in the KW's listed at the top level of the tree?    Or, any other weirdness you may notice.   Also,  just before this problem appeared was LR shut down unexpectedly or crashed?  For example a power failure, or killing it with Task Manager or an error caused it to terminate unexpectedly either with our with out an error messages.   And, lastly, have you had any issues with a failing disk drive (especially the one containing the catalog)?


----------



## AlisonTB (Feb 18, 2021)

Thanks! I looked through my list and the only odd thing I'm  noticing is that words on new images aren't automatically nesting like they should (and used to).  In fact, now that I'm noticing it, things have come un parented all over the place. When I enter 'exercise' in the keyword LIST window, I'm not sure 
Yes I've had a bunch of crashes, (usually when also using PS) and I added lots of RAM to my desktop in December. No crashes since then. My catalog is stored on an external hard drive.


----------



## Johan Elzenga (Feb 18, 2021)

Califdan said:


> It's really annoying when you get old and forget stuff, but a vaguely recall a problem where in the database (i.e. the catalog) the root entry of the keyword list tree had a problem. But for the life of me I can't recall what the problem was but something tells me that it should have been blank (only pointers and surrogate keys - no "name") but instead had some text in it. almost like a none root keyword lost its place in the chain by acquiring a null value in the parent keyword ID field.


Yes, now that you mention it, it also vaguely remember that. There should be an old thread here, but it may be difficult to find it.


----------



## AlisonTB (Feb 18, 2021)




----------



## AlisonTB (Feb 18, 2021)




----------



## AlisonTB (Feb 18, 2021)

sorry to keep posting images, but I actually think its getting worse as we're speaking......


----------



## Johan Elzenga (Feb 18, 2021)

This looks like catalog corruption to me. Suddenly there is not only this keyword problem, but now your filters only show ‘A’ for Camera, Lens and Label?...


----------



## Johan Elzenga (Feb 18, 2021)

I found that earlier thread: Library module - Keyword database corruption (Keyword Showing Up Everywhere)


----------



## AlisonTB (Feb 18, 2021)

Johan Elzenga said:


> This looks like catalog corruption to me. Suddenly there is not only this keyword problem, but now your filters only show ‘A’ for Camera, Lens and Label?...


----------



## AlisonTB (Feb 18, 2021)

Not sure what your mean. I'm trying to send a screen shot but it keeps telling me they are too big. My filters s how all the cameras and lenses as far as I can see....


----------



## Califdan (Feb 18, 2021)

Johan Elzenga said:


> I found that earlier thread: Library module - Keyword database corruption (Keyword Showing Up Everywhere)


Johan,  I too was coming to the "corrupt catalog" conclusion. 

Well done in finding that old post.  I'm glad that I'm not going crazy in vaguely recalling that thread.   I'd suggest to the OP that they read that post in its entirety and take heed on the warnings and precautions (e.g. work on a COPY of the catalog rather than the real thing - even if you think you're just going to "look around and not change anything").   

If Alison knows something about databases it may be something she could try out.  If not, then I'd certainly try some of the other suggestions such as  exporting the keyword list to see what it looks like (and just in case things go from bad to worse) and definitely try the "check integrity" and "optimize catalog" tools AFTER TAKING A GOOD BACKUP.

I don't know if Victoria is listening, but is this the sort of thing that the OP can send her catalog to your team for a look see?


----------



## AlisonTB (Feb 18, 2021)

thanks folks! But I'm afraid I don't understand much of what you're saying. Corrupt catalog, yes. My images all have keywords, but I use the 'collections' extensively and would hate to lose them if I had to change catalogs, or make a fresh one. Help?


----------



## AlisonTB (Feb 18, 2021)

I exported the keyword list and didn't see "exercise" anywhere.....


----------



## Califdan (Feb 19, 2021)

Alison,


The probability that you have a corrupt catalog is somewhat above 50/50 based on what we know so far
The odds that the catalog can be fixed is somewhat below 50/50, but we should see if Victoria or one of her other staff is able to take a look at it.  If so they will ask you to make a copy of it on a server somewhere where they can get at it.  They have un-corrupted catalogs in the past but it's not a sure thing.
If you have been diligent in creating backup copies of your catalog either when LR exits or through other external tools such as Time Machine or other tools,  and you haven't done a lot of work in LR since the problem occurred, reverting back to one of those backup versions is a good choice.  here is a blog on how to do it....   https://www.lightroomqueen.com/restore-backups/ 
If recovering through a Backup is not practical, the last solution is to make a copy of you catalog using the "export as catalog" function.   I don't recall if this method preserves image participation in Collections but if you get to this option we can determine this.    In this option, it is not clear how the catalog corruption will affect which keywords get exported to the new catalog but I'm pretty sure the actual corruption (wonky internal pointers) will be eliminated.  It may work just fine or it may wind up with your spurious "Exercise" keywords scattered around but even if it does, they can then be cleaned up manually.  Again, this is a near to last option so let's cross those bridges if and when we need to.


----------



## Johan Elzenga (Feb 19, 2021)

Yes, export as catalog preserves everything in the catalog, so also collections and smart collections. The only thing that will not come over is publishing services.


----------



## AlisonTB (Feb 17, 2021)

Hello all:

I've noticed for some time a strange keyword. "Exercise" shows up all over the place, even though it's not in my keyword list. Also, it sucks up other keywords and nests them under it. When I click on a image and see Alcatraz<exercise, there are no check marks next to anything but Alcatraz (or below) in my keyword list. If I search for "exercise" tons of irrelevant images show up, but again there are no check marks in the keyword list to tell me where this word is hiding out. 
Anyone else have this issue with a keyword? 

Alison


----------



## Califdan (Feb 19, 2021)

Johan,  thanks for the info.  I was pretty sure that it maintained collections but couldn't test it as my catalog was being backed up and also couldn't find anything specific in the documentation other than how to actually export a collection.


----------



## AlisonTB (Feb 19, 2021)

Thanks!   I will do 'export as a catalog' but the thing is HUGE- 132,000 images and lots of collections. I believe the collections do go out when you export as a catalog- I've done it before. Then I will open the exported catalog, relink the images, and see where I'm at.


----------



## Johan Elzenga (Feb 19, 2021)

AlisonTB said:


> Thanks!   I will do 'export as a catalog' but the thing is HUGE- 132,000 images and lots of collections. I believe the collections do go out when you export as a catalog- I've done it before. Then I will open the exported catalog, relink the images, and see where I'm at.


You only need to create the new catalog, so do not include the ‘negatives’ (original images) and do not generate previews or smart previews. Just rename your current previews to match the exported catalog name after the export is finished. Exporting a 132,000 images catalog will take some time, but such a catalog is not as huge as you think. Mine is 200,000 and I know photographers who have catalogs ten times that size.


----------



## AlisonTB (Feb 21, 2021)

I exported the catalog and it still has the keyword 'exercise'. Drat. But I did notice something in my original catalog: "exercise" doesn't show up in the keywords box at this point, only in the other box.


----------



## Califdan (Feb 22, 2021)

and, "exercise" is not a parent keyword (immediate parent or anywhere up the chain) of any of the "enter Keywords"?   Also, re-verify in the new catalog that filtering the keyword list (not the images, but the list of keywords) doesn't show "exercise".





It it entirely possible that your "bad" catalog sent the mythical "exercise" keyword to the new catalog but in this case it is probable that it was added as a regular keyword (and not a corruption of the KW list).


----------



## AlisonTB (Feb 22, 2021)

Thank you for your tine with this!
Nope, doesn't show up in that box- its blank. Or in the keyword list. And only sometimes in the keyword box when "enter keywords" is selected, but often when "keywords & containing keywords" is selected. Sometimes is has things nested under it, and sometimes all by itself in 'keywords & containing keywords".  When I search for 'exercise" using text:keywords/contains words:exercise lots of images come up, but there are no checks next to any 'exercise' word I can find in the list, even drilling down through the parenting.  There simply is no 'exercise' word into keyword list that I can find.


----------



## AlisonTB (Feb 22, 2021)

Also I exported the keyword list as a .txt file and 'exercise' dosen't show up there either.


----------



## Califdan (Feb 23, 2021)

I'm running out of ideas.  

You can try a preferences Reset.  How do I reset Lightroom's Preferences? | The Lightroom Queen

Also, you may want to temporarily disable all your plugin's.  I can't imagine how one would do this, but you never know.


----------



## Philippe Coudé du Foresto (Feb 23, 2021)

This looks like the old "Ghost keyword" problem that I explained here.
This bug has been fixed in the recent LR version, however you may still have to fix the corruption in the database.
If you don't know how to fix the DB, send a PM to me I'll do it for you.


----------

