1.7.2: Hierarchical keywords are not written to IPTC correctly using category menu

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

lasy
Posts: 1
Joined: Wed Jul 17, 2024 7:29 am

1.7.2: Hierarchical keywords are not written to IPTC correctly using category menu

Post by lasy »

XnView: MP 1.7.2 - 64-bit
OS: macOS Monterey 12.7.5

The preferences are set to write hierarchical keywords to IPTC data when the categories of a jpeg file is changed. But only the last word is written when the categories are set by "Category" context menu or "Category" dropdown in the toolbar. The hierarchical keywords are written as expected by tick the checkboxes in the "Categories" panel.

Effect: only the last word of hierarchical keywords is written.

To reproduce:

1. Set preferences to enable writting hierarchical keywords to IPTC data
settings.png
2. Create hierarchical categories

3. Select a jpeg file, set the categories by check the checkboxes in the "Categories" panel
categories.png
4. Check the IPTC keywords in "Info" panel (may need to press F5 to refresh)
info_iptc_1.png
info_xmp.png
Both the IPTC and XMP data are correct.

5. Now set the categories by "Category" context menu (or the dropdown in the toolbar)
category_menu.png
6. Do the same as Step 4
info_iptc_2.png
info_xmp.png
The IPTC data contains only the last word, the XMP data is correct.

Actual behaviour (bug): the behaviors of those two methods to set categories are not consistent.

Expected behaviour: the behaviors of those two methods are consistent and the IPDC is set correctly by either of them.
You do not have the required permissions to view the files attached to this post.
User avatar
michel038
XnThusiast
Posts: 1450
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: 1.7.2: Hierarchical keywords are not written to IPTC correctly using category menu

Post by michel038 »

Classical keywords structure for three keywords : World, Asia, China

1) Without hierarchy :
Xmp-dc-subject : World, Asia, China
This metadata is a list, so we can also display
Xmp-dc-subject(1) World
Xmp-dc-subject(2) Asia
Xmp-dc-subject(3) China

Xmp-lr:hierarchicalSubject(1) World
Xmp-lr:hierarchicalSubject(2) Asia
Xmp-lr:hierarchicalSubject(3) China

IPTC:keywords : World, Asia, China
This metadata is also a list, so we can also diplay
IPTC:keywords(1) World
IPTC:keywords(2) Asia
IPTC:keywords(3) China

2) With hierarchy
Xmp-dc-subject(1) World
Xmp-dc-subject(2) Asia
Xmp-dc-subject(3) China
(no hierarchy in "subject" metadata)

Xmp-lr:hierarchicalSubject[1] World
Xmp-lr:hierarchicalSubject[2] World|Asia
Xmp-lr:hierarchicalSubject[3] World|Asia|China


IPTC:keywords(1) World
IPTC:keywords(2) World|Asia
IPTC:keywords(3) World|Asia|China
When displayed in a single line :
IPTC:keywords : World, World|Asia, World|Asia|China

-----------
In your example, you give the impression that you only want to create the keyword “China”, and not World and Asia ...
So I can't imagine a hierarchical pattern for a single keyword.

In order to create the classical pattern, you should tick "Automatic assign parent category" , so XnViewMp will create the complete pattern ...