Custom and URL hyperlinks are disappearing after editing stories in InCopy and then reopened in InDesign

In the last few weeks my team has noticed that after going back into files that have been edited in InCopy, a random number of custom or URL hyperlinks have just disappeared (but not there hyperlink text sources so we have to spend extra work cleaning those out in order to relink things), and this is causing some massive headaches for our workflow.

It should be noted that almost nothing we do is standard operating procedure for InDesign workflows; we are exporting to HTML with the help of a plugin, we use InDesign/InCopy through shared OneDrive/Sharepoint folders, I’ve built several custom plugin tools to add new funtionality to our HTML books - this being one of them.

My plugin tool uses the hyperlink features of indesign to inject event listeners into the hyperlink html elements, which can then be hovered or tapped on in the HTML export for little pop-ups. This has worked for a few years now and while there has been more than its fair share of problems the created hyperlinks having disappeared has never been one of them. Does anyone have insight as to why this could be happening? was there something the latest 21.1 version updates of InDesign or InCopy that could be affecting it?

Edit: I can confirm that not working out of OneDrive/SharePoint has not helped. I tested using a book i knew had the issue just working out of my downloads folder. I opened the book in InDesign, corrected a few links, then opened it in InCopy and checked out the story with the links (the links as still showing in InCopy’s hyperlink link panel both before and after checking out/in a story), then reopened in InDesign and poof, they’re gone. (After a bit more testing, some times the hyperlinks seem to be missing in InCopy as well, but not always.) However it seems only the last made hyperlink is retained.

Looking at the XML in the story file, i can see there only seems to be one or two <HyperlinkURLDestination> objects, yet all the <HyperlinkTextSource>.

In InDesign:

In InCopy:

Back in InDesign:

Our ExtendScript solution has experienced issues with hyperlinks for years. In our case, the links are getting created in Adobe InDesign. I believe I don’t allow them to be created in Adobe InCopy (though I’ve not looked at our InCopy support for a few years).

One of the things I kept hitting with the hyperlinks was an issue with a link not being able to be created if the same text already had a link. If you think about it, you can’t do that with HTML either. But in my case, I was using one hyperlink as a ‘real’ hyperlink and the other to hold a reference to another property - maybe similar to your use?

The other thing we found is, I’m sure, related to where I was stashing some part of the link. It’s been a long time since I’ve looked at it, but we found that if we imported content that was going to get a link created by the code, and if it was replacing the same previously imported content, Adobe InDesign would balk at the fact that the same page/document/something couldn’t have two matching links. Almost like the first content’s links aren’t removed before the links need to be replaced by the new content.

In my case, we document that it’s a known behavior, and we strip (don’t bother creating) the replicated links if Adobe InDesign throws that error. But it sounds like that’s definitely not a valid option for you.

What does all this mean? Well, I feel your pain in working with hyperlinks. But I have no solutions.

thanks for the reply! However we are definitely using a different method entirely. The hyperlinks we create include a hack to force an event listener into the html that can then reference an attached json object in the browser, no need to other references within the document itself. As for what is being linked, they are just words for a glossary system i built, and there could be many glossary terms on any given page or story.