Skip to main content
Javier Gómez Laínez
Inspiring
December 10, 2021
Answered

status property of links no longer working in CC 2022?

  • December 10, 2021
  • 2 replies
  • 536 views

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 has been closed for replies.
    Correct answer Javier Gómez Laínez

    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.

    2 replies

    Javier Gómez Laínez
    Javier Gómez LaínezAuthorCorrect answer
    Inspiring
    December 10, 2021

    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.

    Javier Gómez Laínez
    Inspiring
    December 10, 2021
    erinferinferinf
    Adobe Employee
    Adobe Employee
    December 10, 2021

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