Bug when pasting text into extra fields

This may be a niche issue, but I feel like it might be a pretty easy fix.

Sometimes when studying I will copy the Text from note #1 and paste it into one of the extra fields for a related note (note #2) so that I can reference note 1’s info when studying note 2. If the pasted text includes more cloze deletions than note 2, when I paste in the text anki automatically creates an additional card for note 2.

In my opinion, since cloze deletions don’t work in any field besides the “Text” field, encountering cloze deletions in any other field in a note should not automatically create more cards.

I have already tried just deleting the brackets after I paste the text it in so that Anki doesn’t detect the clozes, but this doesn’t work as it seems like the additional cards are created immediately upon pasting.

Here is a picture of an example of a situation where this error would occur:

Not a huge deal tbh, but would be nice to not have to delete all those extra cards every time it happens :slight_smile:

That’s not quite correct though. They will work in any field that the note type/template allows.

When I just tried this in a cloze note (default Cloze template), I got this error – and no new card was created. That’s expected behavior because the “Back Extra” field doesn’t have a cloze filter on the template.
image

It could be a version issue, I suppose (I’m using 24.06 Qt6 Windows 11). But I also wonder about your note type. Click Cards ... – does your template include a cloze filter for that field?

Ah thanks for the reply Danika! I’m don’t think the field I’m using has a cloze filter since I also get that same error message (sorry I forgot to mention this in the first post)

I usually delete the brackets after pasting, which gets rid of the error message but doesn’t prevent the duplicate cards.

I just tried using the default cloze template and pasting multiple clozes in the “Extra” field, and still got duplicates.

Hm it could be a version thing, I’m on 24.11 Qt6 for Mac (tried with no addons and the problem persists)

Thank you for checking those details. I just went back to verify my experiment, and I am now also getting the card created – so I don’t know what happened the first time. But at least that means it’s not a newly introduced issue!

When you put a cloze marker in a non-cloze field, it seems reasonable to expect that error, but no card created. I can see that when you try to add a new note like that – Anki won’t let you. You’re blocked completely until you fix it.

Obviously, we wouldn’t want you blocked from pasting in an existing note! So perhaps there’s a technical limitation after the note is added – the card has to be created? I’ll let devs address that part.

The checks are only done on card creation. When editing, changes are made in (near) real-time, so to avoid extra cards being created, you’ll need to either paste into a separate window and remove the cloze markers first, or use tools>empty cards to remove the unwanted cards later.

1 Like

Hey dae thanks so much for the reply!

I understand this – my hope was that there could be some way to fix this in the software. If not or if it’s too unimportant currently, no worries. Thanks so much! :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.