• Resolved seanhelmes

    (@seanhelmes)


    When an image has an IPTC 2#005 “object-name” in its meta-data I want the uploaded image to inherit that as the image’s title in WordPress media library. I have mapped this properly in the MLA plugin’s IPTC & EXIF Processing Options settings. I have in the settings for Priority to be IPTC. I have in the settings for Existing text to be replaced. I have the Status as Active. I keep getting the IPTC 2#105 “headline” as the title when I upload images. How can I over-ride this so the WordPress default title for images uploaded equals IPTC 2#005 “object-name” ? Is there something I can add in my functions PHP file? I thought I could set the image title to any IPTC field I want using this plugin. Help would be much appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question, and thanks for the detailed description of your mapping rule; very helpful.

    WordPress has some code to populate the Title field from the IPTC Headline, if present, and the Caption field from the IPTC caption-or-abstract field. It looks like you images are populated from these default values.

    Your rule looks fine, and you noted that it is set to Active status. I copied these settings to my test system and it is working as intended.

    Mapping during the upload process is not enabled by default. Can you confirm that you have checked the “Enable IPTC/EXIF Mapping when adding new media” box and saved this option setting? It appears to the left of the rule table on the IPTC/EXIF tab in the Settings/Media Library Assistant screen. You can also check the “Enable IPTC/EXIF Mapping when updating media metadata” box, but in my testing this was not required to update the Title field as you intend.

    If the box is checked but you still have a problem, can you try going to the Media/Edit Media screen for one of the images and clicking the “Map IPTC/EXIF metadata” link in the upper-right corner of the screen? Does that update the Title value?

    If you can post a link to one or more of your images I can investigate further and see of the problem is specific to your images. If you rather send images by email I can give you my contact information.

    I will leave this topic unresolved until I hear back from you regarding the above suggestions. Thanks for your help and your interest in the plugin.

    Thread Starter seanhelmes

    (@seanhelmes)

    I can confirm that I have checked the “Enable IPTC/EXIF Mapping when adding new media” box and saved this option setting. I also have checked the “Enable IPTC/EXIF Mapping when updating media metadata” box and saved that option setting.

    The title field still does not update to my IPTC 2#005 “object-name” when I click the “Map IPTC/EXIF metadata” link. It still remains the IPTC headline.

    Here is a link to download the image I have been using which contains the appropriate metadata in it:
    https://app.box.com/s/znloi2obuadzg2dgoyiea2eiip6wktyo

    One thing I can note is I created a new custom field of “Image title” and mapped it to the IPTC 2#005 “object-name” field and it imports the value correctly there from the image, so the issue seems to be with the default wordpress title field for images.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the additional information and especially for the link to an example image.

    The example you gave has a numeric value in the object-name field. The MLA logic for mapping the Title field does not allow all-numeric values. This is modeled after code in the WordPress /wp-admin/includes/media.php file, function media_handle_upload(), which contains a similar restriction.

    My testing shows that an all-numeric Title value does not seem to cause any problems, so I have decided to remove the restriction from the MLA mapping code. I appreciate your calling my attention to this “feature” and motivating an MLA change.

    I have uploaded a new MLA Development Version dated 20180706 that contains a fix. To get the Development Version you can follow the instructions in this earlier topic:

    PHP Warning on media upload with Polylang

    It would be great if you can install the Development Version and let me know how it works for you.

    I will leave this topic unresolved for now. Please let me know if you try the Development Version. Thanks again for your help and for your interest in the plugin.

    Thread Starter seanhelmes

    (@seanhelmes)

    Hi David,

    I can confirm the development version fixed the issue and the image title now is imported correctly. Thank you for doing that. I look forward to seeing it in the next release.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.75, which contains the fix for this topic. I am marking the topic resolved, but please update it if you have any problems or further questions regarding the new version.

    Thread Starter seanhelmes

    (@seanhelmes)

    Thank you David!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress default image Title not syncing with IPTC 2#005 “object-name”’ is closed to new replies.