Author Topic: Possible bug in "Update IPTC/XMP"  (Read 4836 times)

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Possible bug in "Update IPTC/XMP"
« on: May 10, 2010, 11:06:58 AM »
Hi Kirk,

there seems to be a bug in the "Update IPTC/XMP" function. I used the following config:

- full described JPEGs (the caption contains line breaks written with PM current beta version) on my Mac
- applied "Update IPTC/XMP" to write the all IPTC data but especially the captions from the JPEGs to my NEF/XMP files
- import the NEFs into Lightroom on my MacBook -> everything is fine
- import the NEFs into Lightroom on my PC -> everything looks fine but all text after the line breaks of the caption is gone and will not be shown

When I look into the XMP file, the XMP-dc section doesn't show a CR/LF sign but:

Code: [Select]
<rdf:li xml:lang="x-default">Spiel der 1. Bundesliga Saison 2009/10 (34. Spieltag) zwischen Hertha BSC gegen Bavarian München am 08.05.2010 im Berliner Olympiastadion Bavarian Munich’s Thomas Müller (25)</rdf:li>

Is it a bug or something special I did wrong?


Thanks for any help and best regards,
Lars

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Possible bug in "Update IPTC/XMP"
« Reply #1 on: May 10, 2010, 12:15:30 PM »
Lars,

there seems to be a bug in the "Update IPTC/XMP" function. I used the following config:

- full described JPEGs (the caption contains line breaks written with PM current beta version) on my Mac
- applied "Update IPTC/XMP" to write the all IPTC data but especially the captions from the JPEGs to my NEF/XMP files
- import the NEFs into Lightroom on my MacBook -> everything is fine
- import the NEFs into Lightroom on my PC -> everything looks fine but all text after the line breaks of the caption is gone and will not be shown

When I look into the XMP file, the XMP-dc section doesn't show a CR/LF sign but:

Code: [Select]
<rdf:li xml:lang="x-default">Spiel der 1. Bundesliga Saison 2009/10 (34. Spieltag) zwischen Hertha BSC gegen Bavarian München am 08.05.2010 im Berliner Olympiastadion Bavarian Munich’s Thomas Müller (25)</rdf:li>

Is it a bug or something special I did wrong?

I see two line feeds in there (the " " phrases), so I don't know why one version of Lightroom would behave any differently on one system versus another.  Sounds more like a bug in Lightroom to me.

-Kirk

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Re: Possible bug in "Update IPTC/XMP"
« Reply #2 on: May 10, 2010, 12:38:55 PM »
I see two line feeds in there (the " " phrases), so I don't know why one version of Lightroom would behave any differently on one system versus another.  Sounds more like a bug in Lightroom to me.

This is true - I have inserted two line breaks within the PM IPTC editor. Nevertheless I guess it has a bit more to do with PM than with LR. Why? Before I used the "Update IPTC/XMP" function (you gave me this hint yesterday  ::)) I used "exiftool" to "migrate" the IPTC data between JPEGs and XMP. This works well... But there is also a difference in the XMP: whereas PM writes a " " in the XMP, the exiftool inserts a simple "invisible" line feed into the XMP files. Is there a possibility to do this in PM as well?

BTW: is there a possibility to search and replace line breaks with the PM? I tried to copy and paste from such a line break from the IPTC editor as well as from a "normal" editor, but it didn't worked.

Lars


P.S.: I'm always again surprised about the great support here in the forum. So I'd like to use the chance to thank you very much for this here Kirk!

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Possible bug in "Update IPTC/XMP"
« Reply #3 on: May 10, 2010, 12:58:46 PM »
Lars,

I see two line feeds in there (the " " phrases), so I don't know why one version of Lightroom would behave any differently on one system versus another.  Sounds more like a bug in Lightroom to me.

This is true - I have inserted two line breaks within the PM IPTC editor. Nevertheless I guess it has a bit more to do with PM than with LR. Why? Before I used the "Update IPTC/XMP" function (you gave me this hint yesterday  ::)) I used "exiftool" to "migrate" the IPTC data between JPEGs and XMP. This works well... But there is also a difference in the XMP: whereas PM writes a " " in the XMP, the exiftool inserts a simple "invisible" line feed into the XMP files. Is there a possibility to do this in PM as well?

???  Define "invisible".  We just pass the text in the text field off to Adobe's XMP library.  It is doing the entity encoding (the &...; stuff).  Why there is a difference between the Mac and Windows versions of Lightroom's interpreting of XML entities, I do not know.  ExifTool may do its own parsing and updating of the XMP data instead of using Adobe's XMP library, but I don't know this for sure.

Quote from: Lars
BTW: is there a possibility to search and replace line breaks with the PM? I tried to copy and paste from such a line break from the IPTC editor as well as from a "normal" editor, but it didn't worked.

I haven't tested that type of find/replace but it is entirely possible that it may not work.

Quote from: Lars
P.S.: I'm always again surprised about the great support here in the forum. So I'd like to use the chance to thank you very much for this here Kirk!

You're welcome.  We do our best to keep our customers happy.

-Kirk

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Re: Possible bug in "Update IPTC/XMP"
« Reply #4 on: May 10, 2010, 01:08:15 PM »
Kirk,

Quote from: Kirk Baker
???  Define "invisible".  We just pass the text in the text field off to Adobe's XMP library.  It is doing the entity encoding (the &...; stuff).  Why there is a difference between the Mac and Windows versions of Lightroom's interpreting of XML entities, I do not know.  ExifTool may do its own parsing and updating of the XMP data instead of using Adobe's XMP library, but I don't know this for sure.

What I was meaning with "invisible" was that the XMP file looks like a normal text with new lines:

Code: [Select]
<rdf:li xml:lang="x-default">Spiel der 1. Bundesliga Saison 2009/10 (34. Spieltag) zwischen Hertha BSC gegen Bavarian München am 08.05.2010 im Berliner Olympiastadion

Bavarian Munich’s coach Louis van Gaal gibt Kindern Autogramme</rdf:li>

Quote from: Kirk Baker
I haven't tested that type of find/replace but it is entirely possible that it may not work.

hmm, do you know any other chance to search&replace any line breaks within PM?


regards,
Lars

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Possible bug in "Update IPTC/XMP"
« Reply #5 on: May 10, 2010, 01:59:58 PM »
Lars,

Quote from: Kirk Baker
???  Define "invisible".  We just pass the text in the text field off to Adobe's XMP library.  It is doing the entity encoding (the &...; stuff).  Why there is a difference between the Mac and Windows versions of Lightroom's interpreting of XML entities, I do not know.  ExifTool may do its own parsing and updating of the XMP data instead of using Adobe's XMP library, but I don't know this for sure.

What I was meaning with "invisible" was that the XMP file looks like a normal text with new lines:

Code: [Select]
<rdf:li xml:lang="x-default">Spiel der 1. Bundesliga Saison 2009/10 (34. Spieltag) zwischen Hertha BSC gegen Bavarian München am 08.05.2010 im Berliner Olympiastadion

Bavarian Munich’s coach Louis van Gaal gibt Kindern Autogramme</rdf:li>

Quote from: Kirk Baker
I haven't tested that type of find/replace but it is entirely possible that it may not work.

hmm, do you know any other chance to search&replace any line breaks within PM?

No, but even if you were to replace them with CR/LF they would still get entity encoded by the Adobe XMP library.

You can try changing your line endings for IPTC/XMP in the IPTC/XMP tab of the Photo Mechanic Preferences dialog.  Then make some minor change (like using the IPTC Stationery Pad to clear out some unused text field) to the IPTC data and the line endings will be changed.  They will still get entity encoded however.

Give it a try and let me know how it works for you.

-Kirk