Skip to main content
PECourtejoie
Community Expert
Community Expert
Mar 18, 2021 3:17 PM UTC
Answered

Metadata template bug with keywords?

Hi, I noticed that in 11.0.1, windows, if multiple keywords are added from a template, they will be merged inside quotes:

If I try to add Keyword1 and Keyword2 in a metadata template, they will show up  as "Keywork1; Keyword2" instead of keyword1; keyword2, once added to a file.

This works regardless if I'm picking up the 2 KWs from a file, or writing them down with the ; in between.

 

Will try on Mac, did anyone notice it? I have started a uservoice thread on the topic.

This topic is closed to new replies. Start a new post to keep the conversation going.
Stephen Marsh
Stephen MarshCorrect answer
Community Expert
Mar 19, 2021 10:13 AM UTC

https://community.adobe.com/t5/bridge/remove-quotations-around-keywords/m-p/9540166

 

// https://forums.adobe.com/thread/2415320
// https://community.adobe.com/t5/bridge/remove-quotations-around-keywords/m-p/9540166
#target bridge
if( BridgeTalk.appName == "bridge" ) {
sepkeys = MenuElement.create("command", "Seperate Keywords", "at the end of Tools");
}
sepkeys.onSelect = function () {
var thumbs = app.document.selections;
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var FolderName = decodeURI(Folder(app.document.presentationPath).name);
for(var a =0;a<thumbs.length;a++){
var selectedFile = new Thumbnail(thumbs[a]);
app.synchronousMode = true;
var xmp = new XMPMeta(selectedFile.synchronousMetadata.serialize());
var keys = getArrayItems(XMPConst.NS_DC,"subject");
if(keys.length == 1){
xmp.deleteProperty(XMPConst.NS_DC,'subject');
keys = keys[0].toString().replace(/"/g,'').split(",");
for(var k in keys){
xmp.appendArrayItem(XMPConst.NS_DC, "subject", keys[k].toString(), 0,XMPConst.PROP_IS_ARRAY);
}
var newPacket = xmp.serialize(XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
selectedFile.metadata = new Metadata(newPacket);
}
}
ExternalObject.AdobeXMPScript.unload();
ExternalObject.AdobeXMPScript = undefined;
function getArrayItems(ns, prop){
var arrItem=[];
var items = xmp.countArrayItems(ns, prop);
for(var i = 1;i <= items;i++){
arrItem.push(xmp.getArrayItem(ns, prop, i));
}
return arrItem;
};
};
 
 

6 replies

Legend
Mar 19, 2021 4:38 PM UTC

I have not seen this on either platform. I have Bridge set to read and write hierarchical keywords which does seem to make a difference. There is some buggy behavior between different keyword namespaces which I have bugged and I'm not sure what the correct behavior should be.

Translate
Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
Mar 19, 2021 10:13 AM UTC

https://community.adobe.com/t5/bridge/remove-quotations-around-keywords/m-p/9540166

 

// https://forums.adobe.com/thread/2415320
// https://community.adobe.com/t5/bridge/remove-quotations-around-keywords/m-p/9540166
#target bridge
if( BridgeTalk.appName == "bridge" ) {
sepkeys = MenuElement.create("command", "Seperate Keywords", "at the end of Tools");
}
sepkeys.onSelect = function () {
var thumbs = app.document.selections;
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var FolderName = decodeURI(Folder(app.document.presentationPath).name);
for(var a =0;a<thumbs.length;a++){
var selectedFile = new Thumbnail(thumbs[a]);
app.synchronousMode = true;
var xmp = new XMPMeta(selectedFile.synchronousMetadata.serialize());
var keys = getArrayItems(XMPConst.NS_DC,"subject");
if(keys.length == 1){
xmp.deleteProperty(XMPConst.NS_DC,'subject');
keys = keys[0].toString().replace(/"/g,'').split(",");
for(var k in keys){
xmp.appendArrayItem(XMPConst.NS_DC, "subject", keys[k].toString(), 0,XMPConst.PROP_IS_ARRAY);
}
var newPacket = xmp.serialize(XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
selectedFile.metadata = new Metadata(newPacket);
}
}
ExternalObject.AdobeXMPScript.unload();
ExternalObject.AdobeXMPScript = undefined;
function getArrayItems(ns, prop){
var arrItem=[];
var items = xmp.countArrayItems(ns, prop);
for(var i = 1;i <= items;i++){
arrItem.push(xmp.getArrayItem(ns, prop, i));
}
return arrItem;
};
};
 
 
Translate
Bojan Živković11378569
Community Expert
Community Expert
Mar 19, 2021 7:04 AM UTC

Do you mean when editing metadata template and adding additional keywords? I can not reproduce on Windows Bridge version 11.0.1.109

Translate
PECourtejoie
Community Expert
Community Expert
Mar 19, 2021 9:44 AM UTC

Once you add them to the files themselves. It looks right in the template, now apply them to a file, they will be grouped together. At least in 3 of our PCs.

Translate
Bojan Živković11378569
Community Expert
Community Expert
Mar 19, 2021 10:13 AM UTC

No at my side, just tested.

Translate
PECourtejoie
Community Expert
Community Expert
Mar 18, 2021 5:37 PM UTC

The problem does not exist on a Mac, with 11.0.1 that has the same additional Custom Metadata Panel (not Adobe's)

Translate