Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

{clipboard-text-render-error} and {clipboard-image-render-error} #914

Closed
h10im opened this issue Oct 13, 2020 · 9 comments · Fixed by #918
Closed

{clipboard-text-render-error} and {clipboard-image-render-error} #914

h10im opened this issue Oct 13, 2020 · 9 comments · Fixed by #918

Comments

@h10im
Copy link

h10im commented Oct 13, 2020

Using the anki integration, when I try to put the clipboard text or image onto a card field I get these two exceptions
for the handlebars ive got this
https://pastebin.com/c77UZAgg

@toasted-nutbread
Copy link
Collaborator

What browser are you on and what version of Yomichan do you have?

@h10im
Copy link
Author

h10im commented Oct 14, 2020

Yomichan v20.9.28.0 and I am using chrome

@toasted-nutbread
Copy link
Collaborator

This issue appears to be caused by the settings upgrade process not properly upgrading your templates. In your file, there are two declarations of {{~> (lookup . "marker") ~}}, where the upgrader expects only one.

If you have personally set up the templates and would like to keep the changes, you can do the following:

Otherwise, you can reset the templates to the default value on the settings page.

@h10im
Copy link
Author

h10im commented Oct 15, 2020

I have added it and even tried resetting temple but this time it just shows up blank

@toasted-nutbread
Copy link
Collaborator

Can you open up the settings page and toggle Enable native popups when copying Japanese text on, and then revert it to off? See if that makes it work.

I think the issue is the extension doesn't have the privilege to read the clipboard, so it needs to be requested. Toggling that option should request it.

That is a good point that it's very unclear that this is the case, and I overlooked it because my development version doesn't reset privileges. I'll work on an update to make this enabled properly.

@h10im
Copy link
Author

h10im commented Oct 15, 2020

Toggling it asked me for the clipboard permissions and its now working, add be it takes while for when its for an image

@toasted-nutbread
Copy link
Collaborator

toasted-nutbread commented Oct 15, 2020

it takes while for when its for an image

This is mostly due to the image being added to Anki, which takes a bit to send the request + store the file I guess. Same thing happens for {screenshot} and {audio}.

Sounds like your issue is fixed using the workaround, so I'm going to close this and track the underlying issue using #925.

@Astarka06
Copy link

Enable native popups when copying Japanese text
can't find this option

@toasted-nutbread
Copy link
Collaborator

The option mentioned in this issue is out of date, the updated label is Enable background clipboard text monitoring in the Clipboard section.

You can also now just check the permissions page and enable the clipboardRead permission. You can open the permissions page using the (?) button from the action popup, then clicking the Permissions link at the bottom.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants