Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Problem with Data Merge and Ghost Hyperlinks

Here’s a story of data records that appeared more than once per page when using Data Merge… something that should not happen. This was one of the stranger problems I’ve seen with Data Merge, but I have heard of it before, so I figured I should write it up — just in case someone else has this problem in the future.

M.G. sent me a problem file which was very simple: It just contained two data fields on a simple background.

data merge panel

 

The background art was on the master page (which is good), and the data placeholders were in a text frame on the document page. That text frame was to be repeated twice per page (like a little grid: one at the top of the page and one at the bottom). Whenever you want to repeat text fields on the same page, you have to use the Multiple Records feature inside the Create Merged Document dialog box:

multiple records data merge

You can adjust the settings in the Multiple Record Layout tab to adjust the margins and column and row spacing and all that. (I’m not showing that here, because it’s not relevant for this particular problem.)

Then, when you want to test it, you can turn on the checkbox labeled Preview Multiple Record Layout.

So that’s all straightforward. But here’s what was going wrong: In this particular document, the Preview worked fine, but when we clicked OK and actually generated the merged document… it didn’t work right. The first record was duplicated, twice on the first page; the second record showed up twice on the second page… and so on.

This was very mysterious because each record should only appear once in the document.

I did everything I could think of to figure out why this was happening… including exporting the file to IDML and opening the IDML file (to get rid of any of kind of file corruption). The problem would not go away. However, if I tried to recreate the file in a new document, I had no problem.

After about 20 minutes, I suddenly remembered to look in the Hyperlinks panel, and I found something… wrong:

ghost hyperlinks

Most people don’t realize that Data Merge placeholders also show up in the Hyperlinks panel. I’ve never quite understood why InDesign does this (because they’re not really hyperlinks), but it just does.

But if you look at the image above, you can see that there are two hyperlinks that have a “1” next to them, which means that those placeholders appear on the first page of the document. And then there are two hyperlinks that have no page number next to them!

Those are ghost hyperlinks. They don’t really exist, they don’t really do anything, and: those are the culprits that messed up this Data Merge! As soon as I deleted them from the Hyperlinks panel, the problem went away.

David Blatner

David Blatner

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at Lynda.com are among the most watched InDesign training in the world. You can find more about David at 63p.com.
David Blatner

Latest posts by David Blatner (see all)

  • - November 30, -0001
Related Articles
Comments

5 Comments on “Problem with Data Merge and Ghost Hyperlinks

  1. Hi David, does this happen also if you create a layout with 2 placeholder, that mean to have a spread sheet and than create a single record merged document? I create some lottery ticket where placeholder were copied 3 times and it worked very well…. I did’t realized tha InDesign created hyperlink. :-( I’m on train now, I’ll try as soon as possible and I’ll show you the example.

  2. David,
    we used to see reports of this problem all the time on the U2U forums, and managed to isolate the cause to bugs in the merge preview.

    Not sure is it’s still the same bug (though I wouldn’t be surprised), but experimentation showed that NOT using the preview at all (just run the merge), or using UNDO immediately after using the preview allowed the merge to proceed correctly.

  3. Using the hyperlinks panel is also a good way of “unassigning” a frame that has a variable image assigned to it. If you want to “unassign” variable data from a frame, click on the frame in question, open the hyperlinks panel and the link should be highlighted – click on the trash can on the bottom right of the panel and it will revert to a regular frame.

  4. I am experiencing this issue since updating to the 2018 CC. The file I’m working with has many data merge points and I found deleting the hyperlinks deletes the data merge tag. Is anyone else experiencing this?

  5. Then, when you want to test it, you can turn on the checkbox labeled Preview Multiple Record Layout.This was very mysterious because each record should only appear once in the document.

Leave a Reply

Your email address will not be published. Required fields are marked *