CS6 hyperlink problem

Contributor ,
Jun 01, 2012 Jun 01, 2012

Copy link to clipboard

Copied

Hi everyone,

 

In Indesign CS6, I created a new URL hyperlink and pasted the following link into the field:

http://law.ato.gov.au/atolaw/view.htm?docid=AID/AID2004688/00001

But when I click OK and then look in the URL field in the hyperlinks panel, I see that Indesign has changed the link to the following:

http://law.ato.gov.au/atolaw/view.htm%3Fdocid%3DAID/AID2004688/00001

Notice how it's swapping out the question mark (?) after .htm with %3F.

It's also swapping out the equals sign (=) with %3D.

This breaks the URL and makes it no longer workable.

I tried reinstalling Indesign but the problem still remains.

I wondered if anyone knows why this is happening and whether there's a workaround?

Appreciate any help.

Views

57.9K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Jun 04, 2012 Jun 04, 2012
@gwhPoster – That seems to be an encoding problem. Do you use a prerelease beta version of InDesign CS6?Background: It seems that every URL that is filled in in the Hyperlink palette is encoded with something like encodeURI() (a global ExtendScript function):
string encodeURI (text: string)Encodes a string after RFC2396.Create an UTF-8 ASCII encoded version of this string. The string is converted into UTF-8. Every non-alphanumeric character is encoded as a percent escape character of the form %xx
...

Likes

Translate

Translate
New Here ,
Jun 06, 2012 Jun 06, 2012

Copy link to clipboard

Copied

Hi,

I was struggling with the same problem but was able to make it work by opening the Hyperlinks panel and manually amending the characters in the URL field (i.e. delete "%3F", key in "?"). Seems to publish to PDF with no issues. Hope that helps!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2012 Jun 06, 2012

Copy link to clipboard

Copied

@skim-creative – try out my script. It will change all hyperlink URLs and hyperlink names. You can undo the action in one go if you like…

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

Hi

I tried your script. I.e I copied the text to a text editor and saved as a .jsx file and placed within the script folder. When I ran it it gave an error number 14, no matching closing brace found?

Cheers Nigel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

Did you really copy the whole script? The braces look balanced to me.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

@Nigel – I can assure you, my script posted in answer #1 is complete…
No missing braces.

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

Hi

I will paste copied text (as below) into a text editor and save as a .jsx file and place within mt scripts. When I run it should I have text highlighted or just do so in the open document I want links to be corrected in?

Cheers Nigel

I have re-copied as this:

//DecodeURI_AllHyperlinks_DestinationURL_Name.jsx
//DESCRIPTION:Decodes all hyperlink destination URLs and names; can be undone in one go!
//Uwe Laubender
/**
* @@@BUILDINFO@@@ DecodeURI_AllHyperlinks_DestinationURL_Name.jsx !Version! Mon Jun 04 2012 14:48:49 GMT+0200
*/


app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

app.doScript(_DecodeURI_AllHyperlinks_DestinationURL_Name, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Decode all hyperlink URLs and names");

function _DecodeURI_AllHyperlinks_DestinationURL_Name(){


var d = app.documents[0];
var allHyperlinks = d.hyperlinks;

for(var n=0;n<allHyperlinks.length;n++){

    var newDestURL = decodeURI(allHyperlinks.destination.destinationURL);
    var newDestName = decodeURI(allHyperlinks.destination.name);

    allHyperlinks.destination.destinationURL = newDestURL;
    try{
    allHyperlinks.destination.name = newDestName;
    }catch(e){};

    };

}; //END function "_DecodeURI_AllHyperlinks_DestinationURL_Name()"


Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

@Nigel – just run the script with a double-click. Nothing selected. Hyperlinks palette closed (but I think that's not necessary).
Make sure that you save the script text in your text editor as "text only", that means not formatted eg to rtf or something..

Are you on Mac OSX or on MS Windows?
If on Mac, use TextEdit, copy the scripts' text to a new file, press cmd+shift+t to make it text-only.
Make sure that text-only-saving is encoded to "Unicode (UTF-8)".

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 05, 2012 Jul 05, 2012

Copy link to clipboard

Copied

This does the same thing for me Just got CS6...so "advanced" it's got werid bugs that were never there before...grrrr!!! Very annoyed with Adobe right now. How do I report a bug?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 06, 2012 Jul 06, 2012

Copy link to clipboard

Copied

How do I report a bug?

@Aussie_leah – go there:

https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

But do not expect Adobe answering…

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2012 Aug 22, 2012

Copy link to clipboard

Copied

Hello! I also am having this problem. I tried running both of the suggested scripts; however, I get the following JavaScript error: Error Number 55. Error String: Object does not support the property or method 'destinationURL'

Does anyone have an idea how to make the script work? I'm using CS6, Version 8 on Windows 7.

Thanks in advance!!!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 22, 2012 Aug 22, 2012

Copy link to clipboard

Copied

@almostlindy – can you give me an example of the URL or target link you are using?

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 22, 2012 Aug 22, 2012

Copy link to clipboard

Copied

I have to see into this and maybe expand the script.

There are several destinations for Hyperlinks:

HyperlinkExternalPageDestination

HyperlinkPageDestination

HyperlinkTextDestination

HyperlinkURLDestination

ParagraphDestination

Don't know, if all those types are buggy…

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2012 Aug 22, 2012

Copy link to clipboard

Copied

Thanks!. An example url is: http://alamo.edu/main.aspx?id=5942. The hyperlink panel converts the ? and the = in the url, so that the resulting url is: http://alamo.edu/main.aspx%3Fid%3D5942.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 23, 2012 Aug 23, 2012

Copy link to clipboard

Copied

@almostlindy – My script should work well with that URL. Maybe there are other circumstances, that throw an error here…

For testing, did you try the script together with a fresh InDesign document that has only the above hyperlink URL?

How do you use the script?
Do you double click it from the Scripts Panel or do you start it from the ESTK (ExtendScript Toolkit)?

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 22, 2012 Oct 22, 2012

Copy link to clipboard

Copied

I just spent 4 hours on Adobe tech support for this very issue.  They told me that it is a bug and that it should be fixed in the next update.  Thier workaround was to paste your link into notepad first and then copy/paste from notepad to your InDesign document......I hope it works!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 29, 2012 Oct 29, 2012

Copy link to clipboard

Copied

Pasting into Notepad did NOT work for me. Yes, I then copied from Notepad. Still includes the stupid extra characters. Have tried many, many times.

Glad that Adobe sees this as a bug. The update to fix it can't come soon enough.

While the script mentioned earlier may very well work, it is way more than I want to do to solve a bug.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 29, 2012 Oct 29, 2012

Copy link to clipboard

Copied

While the script mentioned earlier may very well work, it is way more than I want to do to solve a bug.

@fostercoburn – I'm aware the script is an intermediate solution.

But if I have to fix hundreds of hyperlinks, I'd certainly try it out.

In that case to copy a link from the browser to Notepad and then on to InDesign is no solution.

See #30 in this thread:
http://forums.adobe.com/message/4591559#4591559

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 30, 2012 Oct 30, 2012

Copy link to clipboard

Copied

Try using Paste Without Formatting. That worked for me. Just copied from the InDesign document, pasted without formatting into the URL field.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 30, 2012 Oct 30, 2012

Copy link to clipboard

Copied

I use the script and it is extremely easy. It was a few clicks to install and is a few clicks to use. I'll be thrilled when they fix the bug but truly, this script leaves me in no particular hurry.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 03, 2013 Jan 03, 2013

Copy link to clipboard

Copied

Hi. I've had the exact problem. Any link with JSP? included gets changed when you add it into the "edit" panel, and won't work.

I came here looking for help, but I have no idea how to run a script on an ID file. So I tried one more thing. If you paste the url into the top part of the links panel, with the "link" name hilighted, it will work! Adds an extra step, but it worked.

They need to fix this soon!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

… but I have no idea how to run a script on an ID file.


@debschuller – see the following blog post:

http://indesignsecrets.com/how-to-install-scripts-in-indesign.php

Both scripts presented here, in #51 the enhanced version by Joe Fugate and my original one in #2, are JavaScript (ExtendScript). All the lines should be copied to a plain text file and saved with  .jsx at the end of the file name.

What might be interesting to you as well:

http://indesignsecrets.com/javascript-for-the-absolute-beginner.php

And yes, Adobe should fix this soon.
It's quite a while this bug is known…

Uwe

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

@debschuller – good discovery. Yes, the hyperlink edit box above the link does indeed work properly.

It's just the hyperlink dialog box that encodes the links and in the process breaks them.

I'm amazed that Adobe has let this bug persist for as long as they have. Seems like it would be a simple fix if they would just give it a few hours of attention.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

Thanks so much. I'll try it. I didn't want to take a chance since I was already halfway done with one catalog before I realized there was a problem.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 27, 2013 Mar 27, 2013

Copy link to clipboard

Copied

Thanks 'Debschuller'

Yes, by using the InDesign CS6 Hyperlinks palette directly, you can edit the url, then hit enter (see screenshot image).

Brandon

Screen shot 2013-03-27 at 9.36.39 AM.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 22, 2013 Feb 22, 2013

Copy link to clipboard

Copied

Hi, I just found a work-around. Use a url-shortener like http://ow.ly/url/shorten-url (I created mine through my hootsuite dashboard). The links do not become relative, they work in browsers and mobile and all of our piwik code remains intact!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines