Meta data copy and multiple value issues

Started by hluxem, December 01, 2023, 12:25:32 AM

Previous topic - Next topic

hluxem


I have not used copy and paste for metadata in a while and can't say what version the issue appeared again.

Here is what happens:
  • In the metadata panel copy and paste location data to a selection of files, all looks good.
  • Click green checkmark, some tag values get duplicated
  • It looks like all files have the duplicated value, but only the selected file with yellow frame has the duplicated values
  • If I create the selection with any other file highlighted yellow, the duplicate values are not shown.
  • After I write back metadata, it shows correctly multiple value for the problem tags and the last selected file when the data was copied has the duplicate values.

The minor issue is that the files in the selection contain different values for a tag, it is not shown before write back.
The bigger issue is that one file contains the tags with duplicates values which need to be fixed manually.

I use a nonstandard metadata layout, but the issue here is that only one file gets the wrong values. That is always the last selected file with the yellow frame. 

Mario

I cannot see which tags you use in your custom layout. Please export and attach your Metadata Panel layout. This will help me to reproduce this.

Note: If possible, use JPG when uploading screen shots. This saves 2/3 of disk space.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

QuoteNote: If possible, use JPG when uploading screen shots. This saves 2/3 of disk space.
Will do!

I attached the panel with 2 of the custom layouts. I also created a new test database with the same pictures and did see the same issue, so hopefully you can reproduce this.

Thanks,
Heiner

Mario

#3
Your layout freely mixes elements of structured tags (XMP::iptcExt\LocationShown) and the corresponding tags from other metadata standards and ExifTool's Composite virtual tags.

For example,

"File.MD.XMP::iptcExt\LocationShownCity\LocationShownCity"

is linked to

"Composite\MWG-City\City" and
"XMP::photoshop\City\City"

and

"XMP::iptcExt\LocationShownSublocation\LocationShownSublocation"

is linked to

"Composite\MWG-Location\Location"
"XMP::iptcCore\Location\Location"

IMatch internally synchronizes the values of these tags automatically.

My first guess is that by adding multiple of these linked tags from different sets into your custom layout and then copying and pasting the tags, the auto-synch between linked values is somehow triggered, trying to sync A to B and C while also trying to sync B to A and C (for example, the SubLocation tag).

I will have to sit down and debug this when I have a sufficiently wide time window. This is complex stuff and I have never anticipated that a user would, basically, add the same tag from different sets into a MD Panel (no real use there) and copy and paste them all together between files.

This is probably the reason why no other user reported something similar. Except maybe the non-reproducible tag value issue John has reported, but I was never able to reproduce it, even with his MD Panel layouts and files and stuff.

My guess is that this is also somehow related to the AutoFill problem you've reported today.
Do you also mix linked tags in your AutoFill templates? A quick look at your screen shot seems to indicate that.

Try to use only the structured tag (LocationShown* or LocationCreated*) and leave out the linked Composite tags and XMP::iptc/ XMP::iptcExt tags in your AutoFill templates and MD Panel layouts.

This should solve the duplication problem immediately, I guess.
I will look into this and see if I can "fix" this somehow, or at least warn the user and refuse to copy the linked tags in the MD Panel.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

QuoteYour layout freely mixes elements of structured tags
That's correct, not that I do that to test  Imatch:>). The layouts developed over time; I think I remember that at some point the suggestion was to use only composite tags. The other tags I added over time. It worked fine for a long time. 

I understand that the syncing is complicated my head already starts spinning when I try to understand what happens with these tags. Nevertheless, I think there is somewhere a hidden bug when some tags end up with a different value after syncing. And in most cases, it's only for one image out of the selection. 
It's not an urgent bug, as I can fix it afterwards. It just makes me feel uncomfortable as in addition to the duplicate values the display in the metadata panel is not correct, it should state multiple values as only one file has the duplicated fields.

I created a new database to see what tags the latest metadata panels use. I will try to change my workflow to only copy the tags used in the "6 IPTC Location" panel and let the other tags synchronize. 
I just saw that this layout does not show GPS data for some older files for either location shown or created when a file clearly has exif and composite GPS data. I guess I need to check if the corresponding XMP::iptcExt tags are missing for all files or just for some older files. 

QuoteMy guess is that this is also somehow related to the AutoFill problem you've reported today.
Do you also mix linked tags in your AutoFill templates? A quick look at your screen shot seems to indicate that.
That's correct, it's the same panel layout. I will change the template to use only the below tags from your latest layout and report back. 

I assume these are the tags we are supposed to use:
1 {File.MD.XMP::iptcExt\LocationShownCity\LocationShownCity\0}
2 {File.MD.XMP::iptcExt\LocationShownCountryCode\LocationShownCountryCode\0}
3 {File.MD.XMP::iptcExt\LocationShownCountryName\LocationShownCountryName\0}
4 {File.MD.XMP::iptcExt\LocationShownGPSLatitude\LocationShownGPSLatitude\0}
5{File.MD.XMP::iptcExt\LocationShownGPSLongitude\LocationShownGPSLongitude\0}
6 {File.MD.XMP::iptcExt\LocationShownGPSAltitude\LocationShownGPSAltitude\0}
7 {File.MD.XMP::iptcExt\LocationShownLocationName\LocationShownLocationName\0}
8 {File.MD.XMP::iptcExt\LocationShownProvinceState\LocationShownProvinceState\0}
9 {File.MD.XMP::iptcExt\LocationShownSublocation\LocationShownSublocation\0}


For me the value in tag 9 Sublocation is used in the composite tag location, the value in 7 LocationName is not used. The 2 tags are not linked, is tag #7 just redundant and should be left empty?

Heiner

Mario

#5
QuoteThe layouts developed over time;
Things change. XMP and IPTC change. How IMatch deals with tags changes.
I did comment at length on this in the 2023 release notes, including the recommendation to only use the modern "6 IPTC Location" Metadata Panel layout to add and modify location data. This properly deals with structured location tags, takes care for mapping etc.

As I said, remove all linked tags (only keep one of them each) and retry your test.
It should work just fine.

Quotehen some tags end up with a different value after syncing. And in most cases, it's only for one image out of the selection.
I would need a lot more details, the files you have used, the MD panel layout if it is not one of the standard layouts etc.
And a separate bug report please, since this seems to unrelated to the issue discussed here.

Quotejust saw that this layout does not show GPS data for some older files for either location shown or created
So much has changed over the years about how XMP and IPTC and IMatch and ExifTool handle location data, map tags between groups etc. Just select the file, press Shift+Ctrl+F5 and then "Reload Metadata". Any change?

Another thing. When you copy & paste GPS data Altitude, make sure you also copy & paste the Altitude Ref value. Else there will be problems if the target has only an Altitude but no ref, e.g. for Composite tags.
Best never update composite tags directly. Always use XMP tags. And don't update linked XMP tags at the same time (like the "XMP::iptcExt\LocationShownSublocation\LocationShownSublocation" and the linked " XMP::iptcCore\Location\Location". IMatch keeps them in sync automatically.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

Quote
Quotehen some tags end up with a different value after syncing. And in most cases, it's only for one image out of the selection.
I would need a lot more details, the files you have used, the MD panel layout if it is not one of the standard layouts etc.
And a separate bug report please, since this seems to unrelated to the issue discussed here.
That's part of the bug report, please see screen shots too.
Quote
  • It looks like all files have the duplicated value, but only the selected file with yellow frame has the duplicated values
  • If I create the selection with any other file highlighted yellow, the duplicate values are not shown.
  • After I write back metadata, it shows correctly multiple value for the problem tags and the last selected file when the data was copied has the duplicate values.

Mario

Did you follow my advice and removed all the duplicate linked tags from your custom layout? And your AutoFill templates?
Does the problem still happen?
Because I can only repro this by adding all linked tags to a MD Panel layout and then copying and pasting the data.
But I have fixed this now, in case of another user has a similar idea and protect the data from being corrupted or duplicated in this case. So far, this has not been reported, which makes me think you are the only user with this mix of linked tags in custom layouts and AutoFill templates.

I will look into the specifics of the AutoFill somewhen next week, when there are some free time slots. I assume this is also fixed now.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

QuoteDid you follow my advice and removed all the duplicate linked tags from your custom layout? And your AutoFill templates?
I changed the metadata layout and removed the linked tags. I still need to modify the auto fill templates. I did see that you fixed some Windows issues there. Thanks for the great support!

Just as an FYI, it's not something a user should do, but users can do it. If you create a layout with just the same tags as in a structured location layout and then use the copy function. When you paste it on a layout with the structured tag, not all values are pasted. Not a problem at all for me, just thought I mention it.

Mario

QuoteJust as an FYI, it's not something a user should do, but users can do it. I
This is true for many things. I'm just unable to envision all things users will do and how they can break things. It's also not worth the time to figure out all possible edge cases and prevent them or deal with them from the beginning. It's more time efficient to wait until a user does something unexpected and breaks something and then do something about it. In fact, in most cases, no user ever discovers limitations or edge cases undealt with.


QuoteIf you create a layout with just the same tags as in a structured location layout and then use the copy function. When you paste it on a layout with the structured tag, not all values are pasted. Not a problem at all for me, just thought I mention it.
More details please, in a new bug report. This one is closed and the ticket is final. And your latest finding seems unrelated and maybe will only ever affect you.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook