Skip to main content
Known Participant
October 24, 2018
Answered

Keywords fail to write to file

  • October 24, 2018
  • 1 reply
  • 842 views

In Bridge 9.0.0.204, whenever I apply a keyword to several files, one always fails.  Once the other files are keyworded, I can then apply the keyword again and it works fine on the file that failed.  But this means always having to apply the keyword twice to files in the group.  I've tried this with different groups of files, always with the same error.  The files that report the error have nothing in common with each other.  It's not a file size or file type issue, and it doesn't matter whether the group is two files or ten.

    This topic has been closed for replies.
    Correct answer Abhishek.Seth

    Hi mspiraino,

    Please let us know if the issue still persists.

    Regards,

    Abhishek Seth.

    1 reply

    Legend
    October 24, 2018

    Try resetting your preferences.

    Troubleshoot Adobe Bridge for freezes and performance issues

    If that doesn't work, test with this script to see what happens. Save it in a text editor as a PLAIN TEXT file (not RTF) with file extension .jsx. Open Preferences->Startup Scripts and click the button to reveal the scripts folder. Drag the .jsx file in and relaunch Bridge. Run that script and see if all selected files have keywords added.

    #target bridge

    if(BridgeTalk.appName == 'bridge'){

        VT = MenuElement.create('command', 'Keyword Test', 'at the end of Tools');

        }

    VT.onSelect = function(){

        keyTest();

        }

    function keyTest(){

        var thumbs = app.document.selections;

        var keys = ['Test', 'HTest|Testing', ''];

        if(xmpLib == undefined){

            if(Folder.fs == 'Windows'){

                var pathToLib = Folder.startup.fsName + '/AdobeXMPScript.dll';

                }

            else{

                var pathToLib = Folder.startup.fsName + '/AdobeXMPScript.framework';

                }

            var libfile = new File(pathToLib);

            var xmpLib = new ExternalObject('lib:' + pathToLib);

            }

        try{

            app.synchronousMode = true;

            for(var a in thumbs){

                if(thumbs.hasMetadata){

                    for(var b = 0; b < 2; b++){

                        var md = thumbs.metadata;

                        var xmp = new XMPMeta(md.serialize());

                        xmp.appendArrayItem(XMPConst.NS_DC, 'subject', keys, 0,XMPConst.PROP_IS_ARRAY);

                        xmp.appendArrayItem('http://ns.adobe.com/lightroom/1.0/', 'hierarchicalSubject', keys, 0, XMPConst.PROP_IS_ARRAY);

                        var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);

                        thumbs.metadata = new Metadata(updatedPacket);

                        }

                    }

                }

            app.synchronousMode = false;

            }

        catch(e){

            alert(e + e.line);

            }

        }

    Abhishek.SethCorrect answer
    Adobe Employee
    October 25, 2018

    Hi mspiraino,

    Please let us know if the issue still persists.

    Regards,

    Abhishek Seth.

    mspirainoAuthor
    Known Participant
    October 3, 2019
    The script worked for awhile. Now I continue to have the problem. Purging the cache doesn't seem to help