Lightroom Classic: Library Filter using Location Metadata does not reflect removed location metadata

  • 4
  • Problem
  • Updated 3 weeks ago
  • Acknowledged
  • (Edited)
When adding/changing location metadata on images, the Library Filter location columns are updated to reflect this change.  However, when removing location metadata (sublocation, city, possibly others) from an image with GPS coordinates, the Library Filter location columns continue to show the previous value.  Removing this metadata from images without GPS coordinates results in the Library Filter correctly updating to "Unknown Location".

In the screenshot below, I had set this image to have a sublocation of "Out of date".  I then erased the sublocation in the metadata pane.  As you can see, The Library Filter is filtering to only show images with a location of "Out of date", yet that field is empty in the selected image.


If I then change the sublocation to a non-empty value, the Library Filter correctly updates itself.


This is happening on Lightroom Classic 7.5.



It appears to me that the problem is that Lightroom is not correctly updating the AgHarvestedIptcMetadata table when clearing the location data.  Below is a SQL dump of this table when adding/clearing sublocation on two new images (one with GPS data, one without).  This dump and the above screenshots are from different tests.

Initial state:
sqlite> select * from AgHarvestedIptcMetadata where image in (570455,570463);
572347|570455|||||||unset|-1.0||
572457|570463|||||||gps|-1.0||

After setting sublocation to "abc" in Lightroom:
sqlite> select * from AgHarvestedIptcMetadata where image in (570455,570463);
572347|570455|||||||unset|-1.0|958442|
572457|570463|||||||gps|-1.0|958442|

After clearing sublocation in Lightroom:
sqlite> select * from AgHarvestedIptcMetadata where image in (570455,570463);
572347|570455|||||||unset|-1.0||
572457|570463|||||||gps|-1.0|958442|

Notice how the image without GPS coordinates was reset to the initial state, yet the one with GPS coordinates retained the sublocation data (958442 is the ID given to the location).

If I manually null out the sublocation on this entry in the DB, Lightroom immediately shows the expected "Unknown Location" in Library Filter:

sqlite> update AgHarvestedIptcMetadata set locationRef=null where image in (570463);
sqlite> select * from AgHarvestedIptcMetadata where image in (570455,570463);
572347|570455|||||||unset|-1.0||
572457|570463|||||||gps|-1.0||

Obviously, I don't want to be manually editing my catalog.  But I would like to be able to clear out location data after incorrectly setting it, and still have Library Filter work correctly.
Photo of Nathan

Nathan

  • 8 Posts
  • 0 Reply Likes

Posted 2 months ago

  • 4
Photo of John R. Ellis

John R. Ellis, Champion

  • 3903 Posts
  • 1037 Reply Likes
The screenshots show the problem photo as being selected.  After clearing "Out of date" from Sublocation, try selecting a different photo. Does filtering now work?  I've observed some situations where LR doesn't fully update when you delete a location field, until you select another photo.
Photo of Nathan

Nathan

  • 8 Posts
  • 0 Reply Likes
Unfortunately, no.  I can switch collections, select other photos, unfilter and refilter, change filter criteria, even restart Lightroom.  The filter will always show the "Out of date" Sublocation for photos with GPS coordinates.

For additional confirmation, I created a new catalog, disabled all 3rd party plugins, and ran the test again.  Same results.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3903 Posts
  • 1037 Reply Likes
Can you post a step-by-step recipe to reproduce the behavior. Unfortunately, tt's unlikely Adobe will pay attention to bug reports they can't easily reproduce.
Photo of Nathan

Nathan

  • 8 Posts
  • 0 Reply Likes
Some additional behavior discoveries:
  1. Photos without GPS coordinates must have all location fields (Sublocation, City, State, Country) empty before the Metadata Filter will update to show "Unknown" for removed metadata.  If any one of these fields is left populated, Metadata Filter will continue to show the old value(s) for unset fields.
  2. Photos with GPS coordinates retain their old values in Metadata Filter even after clearing all 4 fields.
  3. Country ISO doesn't seem to come into play.
  4. A photo with GPS coordinates in this out-of-date state will be immediately updated correctly in Metadata Filter if I remove the GPS coordinates from the metadata pane.  This is not an ideal workaround, as Lightroom erases other fields (such as Altitude) when erasing the GPS coordinates, so I cannot simply paste them back in.
  5. This issue affects both photos with embedded GPS location (such as from a smart phone) as well as photos that have had GPS location added after the fact via a GPX file.
Photo of Nathan

Nathan

  • 8 Posts
  • 0 Reply Likes
Steps to reproduce:
  1. Create a new catalog
  2. Import 2 photos.  One with GPS coordinates, one without.
  3. Open the Metadata Filter and choose Location Columns.
  4. Observe that all 4 Metadata Filter columns show "Unknown ___ (2)".
  5. Select both photos (or do it to both individually), and set Sublocation, City, State, and Country to "Out of date".
  6. Observe that all 4 Metadata Filter columns show "Out of date (2)".  This is expected.
  7. Select both photos (or do it to both individually), and erase the Sublocation metadata.
  8. Observe that all 4 Metadata Filter columns still show "Out of date (2)".  My expectation is that the Sublocation column show "Unknown ___ (2)", since the metadata field is blank for both photos.
  9. Select both photos (or do it to both individually), and erase the Country metadata.
  10. Observe that all 4 Metadata Filter columns still show "Out of date (2)".  My expectation is that the Sublocation and Country columns show "Unknown ___ (2)".
  11. Select both photos (or do it to both individually), and erase the City metadata.
  12. Observe that all 4 Metadata Filter columns still show "Out of date (2)".  My expectation is that the Sublocation, Country, and City columns show "Unknown ___ (2)".
  13. Select both photos (or do it to both individually), and erase the State metadata.
  14. Observe that all 4 Metadata Filter columns now show "Out of date (1), Unknown ___ (1)".  My expectation is that all 4 columns show "Unknown ___ (2)".
  15. Select "Out of date" from any of the 4 columns.
  16. Observe that Lightroom filters to show the photo with GPS coordinates, and that the metadata pane clearly shows that none of the fields have "Out of date" for a value.
Steps 7-14 show that the Metadata Filter does not update to show erased location data until all location data is erased.  As a user, my expectation is that the Metadata Filter updates to show "Unknown ___" for each field individually after erasing that field in the metadata pane.  The Metadata Filter immediately updates when setting/changing any of these fields individually, so clearing any should also cause an immediate update.

Steps 13-16 show that photos with GPS coordinates get stuck in this "Out of date" state.  At a minimum, the photo with GPS coordinates should have returned to "Unknown ___" state in the Metadata Filter like the photo without GPS coordinates did at step 14.  But I would still prefer to see the Metadata Filter update to "Unknown ___" for each field individually when erasing them.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3903 Posts
  • 1037 Reply Likes
I was able to follow those steps and reproduce the bug -- thanks for posting such a clear step-by-step.
Photo of Reetesh Mukul

Reetesh Mukul, Employee

  • 37 Posts
  • 6 Reply Likes
@Nathan, John R. Ellis -- we will look into this issue. Thanks for describing steps.
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 4482 Posts
  • 886 Reply Likes
Excellent documentation of reproducible steps. This helps greatly.
Photo of Roland Smiderkal

Roland Smiderkal

  • 3 Posts
  • 2 Reply Likes
I observed exactly the same behaviour after updating to Lightroom Classic CC 8.0 today.
Screenshot here: https://www2.pic-upload.de/img/36181976/Lightroom8.0Issue.jpg



(Edited)
Photo of Alan Harper

Alan Harper

  • 440 Posts
  • 86 Reply Likes
Per John Ellis' request, I have "me too'd" this and this here are the first 10 lines of my System Info panel:

Lightroom Classic version: 8.0 [ 1193777 ]License: Creative Cloud
Language setting: en-US
Operating system: Mac OS 10
Version: 10.14.0 [18A391]
Application architecture: x64
Logical processor count: 8
Processor speed: 4.0 GHz
Built-in memory: 32,768.0 MB
Real memory available to Lightroom: 32,768.0 MB