Hook Version 3.4.3 (4626, integration v. 201) is now available: Obsidian, MarsEdit, fmail, Drafts

Is safe mode off, to enable community plugins, in that particular vault? I.e., it’s on a vault by vault basis.

Also: Use UID instead of file paths. and UID field in frontmatter.

Safe mode is off for that particular vault, Use UID instead of file paths is set, and UID field exists in the front matter of the particular note within the particular vault.

When I use the command Advanced URl: copy URI for file, I get the correct file link, i.e. obsidian://advanced-uri?vault=XX&uid=yyy.

For the same note, Hook gives [Note](obsidian://open?vault=XX&file=Note). I also tried the third method, i.e. with the following command: defaults write com.cogsciapps.hook integration.obsidian.URL.scheme hook-file. However, Hook gives me the same result as the second method.

In the following post, @voostindie described a similar issue. Not sure if that is related to this issue, though.

Unfortunately it does not work for me though. It doesn’t actually change the implementation of the 3 modes that were described earlier in the article.

Further tests show that I previously modified the Hook scripts for Obsidian. After restoring to the Hook official scripts for Obsidian, it partly works now.

For an Obsidian note, if I first invoke Hook with Cmd+Shift+Space and then use the command Copy Markdown Link, I can get the desired link to the note. However, if I directly use the command Shift+Control+Cmd+M, this gives me nothing, i.e. the content in the clipboard does not change. For the both cases, I get the following from the Obsidian console: Received URL action {"": true, x-error: 'hook://x-callback-url/setCurrentNodeError', x-success: 'hook://x-callback-url/setCurrentNode?urlKey=advanceduri&plusencoded=yes', action: 'hook-get-advanced-uri'}

1 Like

thanks for updating the forum. Glad the main command works.

that one will be fixed in Hook 3.5, which will start public beta any day now.

2 Likes

@LucB Happy to see you released a new version. To create robust links with the uid field, the user has to enable Use UID instead of file paths in the plugin’s settings. I think you should mention that in the documentation https://hookproductivity.com/help/integration/using-hook-with-obsidian/#advanced

1 Like

Thank you, @Vinzent03 . I’ve now updated the documentation. We’ll send a newsletter out soon to announce the new integration options and make some other announcements.

Do you collaborate with the Obsidian devs in any way or do you make an announcement in Obsidian? I can do that too. I just created a new documentation and would post that together in the plugin update channel in Obsidian’s discord.

Much appreciated, @Vinzent03 ! I had emails with Obsidian devs before but haven’t had direct communication with them for a while. In the past I also communicated on their forum . (there’s a couple of topics or more regarding Hook.) It would be great if you would take the lead. If you let me know the link to your post(s) I will try to have a look at the conversation.

I get email messages from Obsidian’s Discord server that I’ve been mentioned in a particular channel. But when I click on those links I can’t find the mention. And Discord’s search tool does not reveal them either. I find it impossible to navigate Discord servers, so I try to avoid them. I much prefer Discourse.

The Hook To New with the Advanced URL isn’t working for me — is that a related problem or a separate bug?

More details: It seems Hook to New isn’t working when the current context name has non-file system safe characters. ‘/‘ in my case.

Edit: and even when it does create a new Obsidian file, it’s not linking them.

We’ve reproduced Hook to New > Obsidian here. Strange given all the testing we did on this. It does look like if there’s such a character in the file name, the process will fail and the new item file will be opened in a default (non-obsidian) app.

@Vinzent03 has kindly updated the Advanced URI to Version 1.21.1. Any minute now we will release an update to Hook integration scripts to handle Hook to New > Obsidian (advanced uri) better.

The new scripts are in version 206 of Hook’s software integration.

1 Like

Hook to New still fails in Obsidian for me. Anyone else still having problems or is it just me?

When I try to name a file in Obsidian like that I get:

File name cannot contain any of these characters: \/:

for all file names? What mode are you using, per Terminal:

defaults read com.cogsciapps.hook integration.obsidian.URL.scheme
?

Yes, all file names. Using “obsidian-advanced-URI” mode.

The Obsidian file is created correctly, and I can manually hook to/from Obsidian; it just doesn’t automatically hook the contexts with Hook to New → Obsidian.

Mac OS 12.4

Hook 3.5

Scripts 217

Obsidian 0.14.6

Advanced URI 1.21.1

Sorry for the delay, @stevelw . I’ve managed to replicate this with advanced URI. We will have a look. (It’s a long weekend though.)

1 Like

We’ve now found sometimes it works and sometimes it doesn’t. doing Hook to New twice in a row but the user is left with an additional note and set of links. The on/off must have screwed up our tests, or something changed.

The failure to create the hook seems to be because the x-callback-url event is not received by Hook from Obsidian. And there is an error in Obsidian developer window:
VM112:4560 Uncaught (in promise) TypeError: Cannot read property ‘frontmatter’ of null
at AdvancedURI.eval (eval at (app.js:1), :4560:68)
at step (eval at (app.js:1), :72:23)
at Object.eval [as next] (eval at (app.js:1), :53:53)
at eval (eval at (app.js:1), :46:71)
at new Promise ()
at __awaiter (eval at (app.js:1), :42:12)
at AdvancedURI.getUIDFromFile (eval at (app.js:1), :4540:16)
at AdvancedURI.eval (eval at (app.js:1), :4504:51)
at step (eval at (app.js:1), :72:23)
at Object.eval [as next] (eval at (app.js:1), :53:53)

Looks like there’s an issue with the obsidian-advanced-URL plugin (or something underlying in Obsidian) @Vinzent03 does that error message mean anything to you? I know you’re on a Mac yet. We’ll add a caveat emptor on Using Hook with Obsidian – Hook.

1 Like