Hyperlinks changing after compile

Hey all,

Another quick question. I’m done with my book and just checking the hyperlinks I have on the last page. When I did so, all of them worked dandy in Kindle Preview and Calibre. All except one. The link to add my book to the reader’s Pintrest page.

When I check it on the page in the Scrivener editor, it works perfectly. Goes exactly where I want with the proper image and wording attached. I’ve tried the link manually in several browsers and it works great.

I checked closer and discovered that once it goes through the compile and I click on the link in any mobi formatted book, while it goes to the site, it won’t open up either the image or the text I added. In fact, when I look at the link url, it has completely cut off the ending part of the url which would add those attributes.

I am NOT HTML savvy, but seeing that it changes like that tells my little brain that something is going on during the compile process.

~~Edited to add… This is what pops up when I try and go to the pintrest link. Maybe some of you HTML experts will know what it means. :slight_smile:

Parameter ‘image_url’ (value http:null) is not a valid URL format.

I know it means something’s wrong with the image part of the link, but what? Especially since it works otherwise. Can someone help me?

Thanks in advance,
CJ

It could be something happening in Compile, but it’s unlikely, I don’t believe compile does anything to the contents of the URL field itself. However there are many countless and complicated steps in between what you see in the editor and what Amazon produces using their KindleGen utility, so when you run into things like this, the best way to find out where the problem might be originating from is to break things down into steps that require less complexity.

Removing KindleGen from the equation would be the first test. Leave your compile options set to Mobi, but go into the KindleGen compile pane and enable the option to export source files as well. When you compile, you will get the customary .mobi file where you choose to put it, but you’ll also get a folder of HTML and XML files; everything necessary to create a .mobi file in fact. You’ll be able to load these files in your browser, so scroll down to the bottom of the file list and find the section with your social links (Quick Look in Finder can make this a breeze). Load that up in Safari or whatever and see if it works. If it does, you know compile isn’t doing anything to the link. That’s exactly what Scrivener feeds to KindleGen, we’re just letting you peek into the files (most often with the intention of tweaking them if one is so inclined).

And of course, if the problem is with KindleGen itself, there isn’t much we can do about that. It may even be a limitation in MobiPocket itself in regards to URL length that Amazon can’t do anything about, I don’t know though. You may need to use a link shortening service, as is common on Twitter and other things that require extremely short text chunks.

Thank you so much. I’ll start checking that out.

It’s weird that they work in all kindle programs other than kengen.

I’ll let you know what I find.

Thanks again,
CJ

When you say other Kindle programs work but not KindleGen, what do you mean? The latter is just a converter, it doesn’t even have a visible front-end, but rather runs in the background of your system. It is what is used to create a Mobi document, whereas Kindle programs, in general, are used to read Mobi documents passively. I’m also confused by that statement since in the first post you said the Pintrest link doesn’t work in other Kindle programs.

Yeah. My bad. When I wrote the first post, they wouldn’t work either in any of my kindle platforms or Calibre if mobi format was used.

Not sure what I did to tweak it, but now they DO work in Calibre and on my tablet kindle program. Or at least they did last time I checked. Weird.

About the Kengen. When I say it won’t work in that, I mean when I allow it to open the book to check it out. The link doesn’t work when I do that.

Sorry about that. Am I clearer? I’m a newbie at a lot of this.

CJ

That’s quite all right, I just wanted to make sure we were on the same page. Technical problems are nearly always the epitome of the devil being in the details. :slight_smile:

Could you describe the process you are taking, which Dock or Applications icon you are using, etc? I’m not aware of any way to do what you are describing, so I need a little more of those, again, pesky details.

Well hopefully it is sorted out. It sounds like it may be, if they are now working on your tablet.

Sure.

I open the KenGen app from my dock and once it’s opened, I click on the link that says “Open Book to Preview”. It sends me to a drop down window where I choose which mobi book I want to open. Click and open and it presents itself in the previewer.

Same thing happens if I open it from my applications folder.

Is that what you meant?

CJ

Do you mean Kindle Previewer? Because if I run ‘kindlegen’ from the Dock (or double-clicking on it in Finder) I get a Terminal window with some technical help dumped into it.

Well, if you do mean Kindle Previewer, and the link doesn’t work there, but it works in Kindle for Mac, Calibre and on your tablet, then I wouldn’t worry about it. It sounds like a flaw with Previewer in that case, and nobody uses Previewer for reading books.

Yes. The Kindle Previewer. Sorry, thought they were the same thing. But you’re right, I see now they aren’t.

I click on the app in the applications file and The Kindle Previewer opens. I can do the same thing in the dock, but if I close the app, I too, get the terminal window. Don’t know why, but it only happened after I had to reload the application.

I will go check and make sure the link works everywhere I have where you would read mobi files. LOL I’m reading to just take Pintrest out until the thing is solved.

Thanks!
CJ

Yeah, definitely test it some more, but I think you might be okay. Previewer is notoriously weird. I can’t even get it to run on my laptop. The best I could find to get the problem resolved was, “Wait for Amazon to fix it.” Well, still waiting. :slight_smile:

If you do run into problems though, like I said you can also use a link shortening service too, like tinyurl.com or bit.ly.