Errors trying to use image_manual and spans_manual at the same time (TypeError on tokens[token_start] and points)

I'm working on a custom recipe that's using blocks to display a page image and page text for annotation. If I save annotations on either the image or the text only, it seems to work correctly. When I try to annotate and save both, I'm getting errors.

If I annotate the image, then annotate the text, I immediately get: TypeError: tokens[token_start] is undefined

If I annotate the text only and save, then navigate back using history in the side panel, I get: TypeError: points is undefined

If I annotate the image only and save, then navigate back using history, there are no errors.

I do have a custom image_manual_spans_key value set in the block that's using the image_manual view.

Ah! I figured it out by reading the documentation a bit more carefully.

The image_manual_spans_key needs to be set in the main config section, not in the block where the image view is configured.

1 Like

Thanks for posting your solution @rlskoeser! Glad to hear you've managed to work it out :slight_smile: