Some reference links not opening

I’m having a problem with linking items in Scrivener to notes in Evernote and OneNote. If I launch the links myself, using Win-R and entering the URL, they work, but using “Open Link” in Scrivener from the reference panel does not.

What the links that don’t work have in common is that they are not http: links, they are specialized link schemes like evernote:, onenote:, etc., that open apps on my PC. Scrivener is storing the URLs just as I entered them, and if I copy and paste those URLs into the Win-R box or a browser, they open the apps just fine. It’s only Scrivener’s “Open Link” that doesn’t work on them.

The exact breakage varies by app: evernote links don’t seem to do anything at all, onenote: links sometimes open OneNote, but don’t go to the link target. It’s almost like part of the URL is getting dropped or garbled in the process of launching? Maybe Scrivener is doing some sort of escaping or unescaping or splitting on the URL?

I’m using, and I could’ve sworn this worked correctly in a previous version, but I don’t know how long ago that was. (Might’ve been at or before 1.0!)

If you need a sample of a link that’s not working, you can use “evernote:///view/17728403/s162/c6bcdfac-6605-4797-b7dd-1e180ad98a5b/c6bcdfac-6605-4797-b7dd-1e180ad98a5b/”, but of course that won’t go anywhere useful on your machine since you don’t have my notes database on your computer. :wink:

On my computer, though, it goes to a draft scene I composed in Evernote… at least if I paste it in the Win-R box or a browser location bar. It just doesn’t work via “Open Link” in the references panel for a synopsis card in my current project.

(On a side note, it would be really nice if you could double-click to open links instead of having to right-click – it’s much more frequently the case that you want to open a link than to edit it!)

You can double-click the icon to open the link without right-clicking.

When you attempt to open one of the links that isn’t working, do you get an error message indicating that the reference can’t be opened and giving the URL, or is there nothing at all? If you do get the message, is the URL written there correctly or is it off at all? It sounds like that’s not the problem, since you’re able to copy and paste the link and get it to work, but I just want to check that.

I have a copy of OneNote installed, but I’ve only ever used it for occasional testing. How do you create a link to a page? I’ll give this a whirl and see if I can track down the problem, and it will help if I have a working example so I can tell the difference between when it’s not opening through a faulty process and when it’s not opening because the link doesn’t exist. :slight_smile:

You can link to a page by right-clicking its page tab and selecting “Copy Link To Page”. You can also link to a specific paragraph.

However, I just found that if I closed and quit OneNote entirely, it started working again. But this didn’t fix it for Evernote.

When it’s not working, what it does is launch the target app or bring it to foreground, but does not actually go to the target: the app just opens to the last spot it was used at, rather than the targeted note. That’s why I thought maybe it was dropping part of the link. (I can make Evernote act the same way that Scrivener is making it act, by launching just “evernote:” with no data after the “:”.)

But if I copy the same link from Scrivener and launch it with Win-R, Evernote opens the target note in a new window, if it’s not already open. So there’s something different, I just don’t know what. Just in case it was something like the OneNote issue, I completely quit Evernote too, but that didn’t affect the behavior.

I probably have some other apps that use different URL schemes that I could try…

Aha! I figured out at least part of the problem. Scrivener is converting part of the URL to lowercase, instead of leaving it untouched. This isn’t a good idea, and it’s breaking at least one of the apps I’m trying. A url of the form “foo://UPPERCASESTUFF/…” is turned into “foo://uppercasestuff/”, as soon as you enter it. That’s breaking some of my URLs, right off the bat. (You can replicate this just by pasting in the samples I gave, i.e. “foo://UPPERCASESTUFF/…”.)

(While URLs that include a hostname component are technically case-insensitive for such components, you can’t make that assumption for arbitrary URL schemes – they may not be using //xx/ as a hostname.)

This doesn’t really explain why onenote: and evernote: links are breaking, though, just the ones that have a case-sensitive part that looks like a hostname to Scrivener. (Granted, the onenote: breakage appears to have fixed itself since I fully exited OneNote.) Evernote links are definitely still not working, even though Scrivener isn’t changing them (at least at the edit level, the way it’s doing the hostname edits).

(The icon double click is somewhat helpful, thank you. I do still wish the reference panel’s behavior followed Windows UI standards here, though. It should be possible to edit or delete via the right-click menu, while double-clicking on the name should open the link, with F2 or slow double-click invoking edit. My hands are too well-trained on these Windows conventions not to make the same “mistake” each time I try to use references.)

I have the same problem opening an Evernote note directly by a link that I inserted in Scrivener. Trying around for a little while I found it works if I insert the link manually and modify it a little bit.

In the text:

  1. Type a link text, e.g. the title of your note in Evernote

  2. Add a link manually to the link text by using “Edit -> Link”, choose the option “no prefix”, insert the Evernote link into the field, example: “evernote:///view/9999999/999/d000000d-9999-9999-9999-9999999/999999-99999-999-99999-99999/”

  3. Now comes the interesting part: delete the third slash “/” from the URL, that appears directly after “evernote:”. Result: “evernote:[size=200]//[/size]view/9999999/999/d000000d-9999-9999-9999-9999999/999999-99999-999-99999-99999/”. Then confirm this dialogue.

That seems to work for me.

Apply the same method, if you want to add a reference link.

  1. Choose the function “Create external reference”

  2. Insert the Evernote link

  3. Delete the third slash “/” from the URL. ( “evernote:[size=200]//[/size]view/…”)

That seems to work for me as well. :mrgreen: - For the first…


In another round I tried this method with One Note links. For some reason “onenote:///” won’t open the desired page in OneNote while I cannot manage deleting the third slash, without Scrivener automatically changing the link into something like “http://onenote//…” - that means, the “:” behind the “onenote” is being deleted automatically by Scrivener and a “http://” is added before “onenote” in the link.

For some reason, the link works in some other applications where I insert the Evernote links (e.g. MS Word, Visio, and others). And when I tried those links as well with two as with three slashes in the Windows command line (press WINDOWS+R), they work both, also if I use them with two slashes. Then I observed, that if I insert an Evernote link into OneNote, the third slash seems to be deleted by OneNote automatically, and Evernote behaves the same when I insert a OneNote link into Evernote. Hmmm… but both play very well together.

Thanks for the tip, now at least I have a workaround.

But this is a pretty clear indication that Scrivener is messing with the links in some fashion that it shouldn’t be, in addition to the upper/lowercase thing I mentioned. Scrivener ought to use the links as-is with no changes, especially if it’s not a typical ftp/http(s) protocol link.