Skip to main content
Javier Gómez Laínez
Inspiring
Dec 10, 2021 4:50 PM UTC
Answered

status property of links no longer working in CC 2022?

I've been using this really simple script for a while:

if (app.documents.length == 0) alert("No documents are  open. Please open a document and try again.");
var doc = app.activeDocument;
var links = doc.links;

for (var i = 0; i<links.length; i++) {
	if (links[i].status == LinkStatus.LINK_MISSING) {
		links[i].parent.remove();
	}
}

It works perfectly well in versions CS6 to CC2021 (16.4), BUT in CC 2022 (17.0.1) it always throws an error: 

 

Error Number: 55

Object does not support the property or method 'LINK MISSING'. 

 

If checking the now deprecated ExtendScript Toolkit object model Viewer (in a Windows PC) and comparing it to the latest published API (sadly, only for CC 2021), there is a discrepancy. In CC2021, LinkStatus can have these values:

 

LinkStatus.LINK_EMBEDDED

LinkStatus.LINK_INACCESSIBLE

LinkStatus.LINK_MISSING

LinkStatus.LINK_OUT_OF_DATE

LinkStatus.NORMAL

 

BUT the Object Model Viewer in ESTK 4 shows a very different set of values:

 

LinStatus.DATASOURCE_UNAVAILABLE

LinkStatus.FIELD_UNAVAILABLE

LinkStatus.MARKED_AS_DELETED

LinkStatus.OK

LinkStatus.OUT_OF_DATE

LinkStatus.RECORD_UNAVAILABLE

 

Is it a bug or a feature? How can I now know the status of a link?

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Javier Gómez Laínez
    Javier Gómez LaínezCorrect answer
    Inspiring
    Dec 10, 2021 5:07 PM UTC

    Found the "culprit": its EasyCatalog, a plug-in from 65bits that interferes with the LinkStatus included in InDesign! Uninstall EasyCatalog and everything works as expected.

    3 replies

    Javier Gómez Laínez
    Javier Gómez LaínezAuthorCorrect answer
    Inspiring
    Dec 10, 2021 5:07 PM UTC

    Found the "culprit": its EasyCatalog, a plug-in from 65bits that interferes with the LinkStatus included in InDesign! Uninstall EasyCatalog and everything works as expected.

    Translate
    Javier Gómez Laínez
    Inspiring
    Dec 10, 2021 5:11 PM UTC
    erinferinferinf
    Adobe Employee
    Adobe Employee
    Dec 10, 2021 5:07 PM UTC

    Do you use this with InDesign or a different CC product (or more than one)?

    Translate