Title: Mapping problem for Subject&gt;Title, Description, Alternating Text
Last modified: May 21, 2017

---

# Mapping problem for Subject>Title, Description, Alternating Text

 *  Resolved [victorborgvall](https://wordpress.org/support/users/victorborgvall/)
 * (@victorborgvall)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/)
 * Hi
 * I would like to use Media Library Assistant (MLA) to map the value of the XMP“
   Subject” field in my JPGs to the “Title”, “Alternating text” and “Description”
   fields in WordPress.
 * I’ve tried to use the standard mapping fields under IPTC/EXIF with the following
   settings for each of the three mentioned WordPress fields:
    IPTC Value=Default,
   no value selected EXIF Value/Map Value=template:([+xmp:Subject+]) Priority=EXIF
   Existing Text=Replace
 * My WordPress installation is not in English so I have to excuse any poor translation
   of the actual WordPress GUI.
 * When editing an image in WordPress and pressing the mapping button, the mentioned
   fields are not filled with anything.
 * [@dglingren](https://wordpress.org/support/users/dglingren/)
    -  This topic was modified 8 years, 11 months ago by [victorborgvall](https://wordpress.org/support/users/victorborgvall/).

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9154400)
 * Thanks for your question and for the details of your mapping rules; very helpful.
 * The `xmp:Subject` value is an MLA “enhanced” value, created to make XMP metadata
   for images similar to that for PDF documents. MLA looks for a value in the “description”
   field of the “dc” namespace and copies the value to `xmp:Subject`. The most common
   cause of empty results is a lack of data in the image metadata.
 * If you can post a link to one or more of your images I can analyze them and see
   if there is data you can use for your Subject. Any example images and additional
   information you can provide will be very helpful. Thanks for your interest in
   the plugin.
 *  Thread Starter [victorborgvall](https://wordpress.org/support/users/victorborgvall/)
 * (@victorborgvall)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9157264)
 * I’m the one who should thank you David for taking the time to help people. My
   wife is getting tired of me trying to solve this during the evenings…
 * Here is a screenshot of the settings that I’ve tried: [http://www.borgvall.com/screenshot-from-2017-05-22-20-58-55](http://www.borgvall.com/screenshot-from-2017-05-22-20-58-55)
   
   Are there any particular settings that are needed on the first tab, General, 
   that I need to do for this to work?
 * I’m tagging and exporting photos using Darktable and here is an export straight
   from Darktable with the subject values “Malte” and “Universeum”: [http://www.borgvall.com/_3064650-straight-from-darktable](http://www.borgvall.com/_3064650-straight-from-darktable)
 * I can use ExifTool to copy the subject values to the Description field (or any
   field, I guess) as done with this file: [http://www.borgvall.com/_3064650-copied-subject-to-description-using-exiftool](http://www.borgvall.com/_3064650-copied-subject-to-description-using-exiftool)
   
   Then, in this case, WordPress at least seems to name the file “Malte, Universeum”.
 * I’m looking forward to your reply.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9157765)
 * Thanks for your update and for posting the links to your screen shot and example
   images; exactly what I needed.
 * As I suspected, you can get the results you want by finding and using the right
   XMP element. Your examples are an excellent illustration of what is needed.
 * Your “**_straight-from-darktable_**” image includes the “subject” element in 
   the “dc” namespace. It contains a two-element array with “Malte” and “Universem”
   as separate strings. There is no “description” element in the “dc” namespace 
   for this image.
 * Your “**_copied-subject-to-description-using-ExifTool_**” image adds the “description”
   element to the “dc” namespace, as you wrote. It contains a single value, “Malte,
   Universem”. This “description” value is used by MLA to populate the `[+xmp:Subject
   +]` value.
 * You can use `[+xmp:dc.subject+]` to access the original array and return a comma-
   separated string. The confusion is that “dc.subject” and “Subject” are completely
   different values despite the similar names. You won’t need ExifTool if you can
   find the proper way to access the data already in the image file.
 * The dc.subject array (or its lr.hierarchicalSubject array equivalent) is really
   a list of individual keywords describing the image. You will often see the same
   data in the IPTC “2#025 keywords” element when images contain IPTC metadata. 
   MLA will copy the dc.subject array to the “xmp:Keywords” element, so you could
   also use `[+xmp:Keywords+]` to get the value you want.
 * I hope the above explanation makes sense and the suggestions are helpful. I am
   marking this topic resolved, but please update it if you have any problems or
   further questions regarding the solutions I outlined.
 *  Thread Starter [victorborgvall](https://wordpress.org/support/users/victorborgvall/)
 * (@victorborgvall)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9161428)
 * I’m afraid it still doesn’t work. I’ve tried the following:
    [xmp.lr.hierarchicalSubject
   +] [+xmp:Subject+] [+Xmp:dc.subject+] [+Xmp.dc.subject+] [+xmp:subject+]
 * After adding them to the EXIF fields in the standard field mapping part in MLA,
   I’ve pressed the mapping of IPTC/EXIF with meta data, on the edit page, for each
   of the two photos. I’ve also tried to re-upload the photos.
 * Is there any more settings that are needed?
 * Again, thanks for your time.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9161622)
 * Thanks for your efforts and for posting all of the combinations you’ve tried.
   You are so close, but each of the above examples has a slight error. The rules
   are:
    - The “xmp” prefix is case-sensitive, so “Xmp” will not work. This is silly,
      and I will change the next MLA version to remove the case-sensitivity. Thanks
      for bringing it to my attention.
    - The separator between the prefix and the element name must be “:”.
    - The element names are case-sensitive, so “xmp:subject” will not match “Subject”.
      EXIF and XMP elements are case-sensitive so this is a requirement.
 * If you apply all the rules you should have success with:
 *     ```
       [+xmp:lr.hierarchicalSubject+]
       [+xmp:Subject+]
       [+xmp:dc.subject+]
       ```
   
 * Let me know if that works for you. Thanks for your persistence!
 *  Thread Starter [victorborgvall](https://wordpress.org/support/users/victorborgvall/)
 * (@victorborgvall)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9164458)
 * Neither of the following worked:
 *     ```
       [+xmp:lr.hierarchicalSubject+]
       [+xmp:Subject+]
       [+xmp:dc.subject+]
       ```
   
 * The thing that confused me is that my image viewer Geeqie writes Xmp with a capitalized
   X.
 * Is there anything more we can try? I assume there is no other setting that I 
   have to change, except getting this mapping right.
 *  Thread Starter [victorborgvall](https://wordpress.org/support/users/victorborgvall/)
 * (@victorborgvall)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9164469)
 * The attachment meta data might give any clue.
 * array (
    ‘width’ => 900, ‘height’ => 1200, ‘file’ => ‘3064650-straight-from-Darktable-
   2.jpg’, ‘sizes’ => array ( ‘thumbnail’ => array ( ‘file’ => ‘3064650-straight-
   from-Darktable-2-113×150.jpg’, ‘width’ => 113, ‘height’ => 150, ‘mime-type’ =
   > ‘image/jpeg’, ), ‘medium’ => array ( ‘file’ => ‘3064650-straight-from-Darktable-
   2-580×773.jpg’, ‘width’ => 580, ‘height’ => 773, ‘mime-type’ => ‘image/jpeg’,),‘
   medium_large’ => array ( ‘file’ => ‘3064650-straight-from-Darktable-2-768×1024.
   jpg’, ‘width’ => 768, ‘height’ => 1024, ‘mime-type’ => ‘image/jpeg’, ), ‘featured’
   => array ( ‘file’ => ‘3064650-straight-from-Darktable-2-580×200.jpg’, ‘width’
   => 580, ‘height’ => 200, ‘mime-type’ => ‘image/jpeg’, ), ), ‘image_meta’ => array(‘
   aperture’ => ‘2.8’, ‘credit’ => ‘Victor Borgvall’, ‘camera’ => ‘E-M5’, ‘caption’
   => ”, ‘created_timestamp’ => ‘1488813562’, ‘copyright’ => ‘Victor Borgvall’, ‘
   focal_length’ => ’30’, ‘iso’ => ‘3200’, ‘shutter_speed’ => ‘0.016666666666667’,‘
   title’ => ”, ‘orientation’ => ‘1’, ‘keywords’ => array ( ), ), )
 *  Thread Starter [victorborgvall](https://wordpress.org/support/users/victorborgvall/)
 * (@victorborgvall)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9164492)
 * Additionally, I wonder, should I write “template” or something before your suggestions?
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9164604)
 * Thanks for your updates. You wrote “**_Additionally, I wonder, should I write“
   template” or something before your suggestions?_**“.
 * I regret that my earlier suggestions were incomplete. Yes, the Bulk edit fields
   look for a Content Template and you must start your entry with the “template:”
   prefix, e.g.:
 * `template:[+xmp:dc.subject+]`
 * You can find more information and an example in the “Bulk Actions” section of
   the Media/Assistant Help menu. Click on “Help” in the upper-right corner of the
   screen and then “Bulk Actions” in the tab list at the left of the dropdown area.
   You will also find a link to the “Content Template” section of the Settings/Media
   Library Assistant Documentation tab with more information about content templates.
 *  Thread Starter [victorborgvall](https://wordpress.org/support/users/victorborgvall/)
 * (@victorborgvall)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9164984)
 * `template:[+xmp:dc.subject+]`
    and `template:[+xmp:lr.hierarchicalSubject+]` 
   work.
 * Thanks a million David.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9165257)
 * Thanks for the good news! Thanks as well for sticking with me until I figured
   out all of the details you needed to get to a solution. If there’s anything more
   I can do to help you get the most out of MLA (and reclaim your evenings), let
   me know.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Mapping problem for Subject>Title, Description, Alternating Text’ is 
closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

## Tags

 * [description](https://wordpress.org/support/topic-tag/description/)
 * [map](https://wordpress.org/support/topic-tag/map/)
 * [mapping](https://wordpress.org/support/topic-tag/mapping/)
 * [mla](https://wordpress.org/support/topic-tag/mla/)
 * [subject](https://wordpress.org/support/topic-tag/subject/)
 * [title](https://wordpress.org/support/topic-tag/title/)
 * [xmp](https://wordpress.org/support/topic-tag/xmp/)

 * 11 replies
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/mapping-problem-for-subjecttitle-description-alternating-text/#post-9165257)
 * Status: resolved