ODK select from SVG not displayed with skip logic

1. What is the issue? Please be detailed.

When incorporating a select_one question with an image-map appearance in skip logic, the SVG image is not loaded and displayed on the same page when the relevant condition is enabled in Enketo and requires back and forth in the form to be finally displayed.

2. What steps can we take to reproduce this issue?

ODK Central v2023.5.1

Use the same select_one question with image-map appearance and the same SVG file, in isolation (test 1) and within skip logic (test 2)

(see form attached in 5)

SVG test 1 successfully displays the SVG image as expected

SVG test 2 fails to display the SVG image and triggers an error when attempting to proceed due to a mandatory variable constraint.

3. What have you tried to fix the issue?

This behaviour has been observed in both Firefox and Internet Explorer browsers, so seems independent on the browser.
The form has only been tested within Enketo and not been tested on ODK Collect.

In test 2, navigating backward (after the right relevant condition has been selected) then forward appears to resolve the display issue, suggesting that the SVG image is loaded with the page when enabled by the skip logic. A potential workaround could be placing it on a different page, though this may disrupt the flow of the form.

4. Upload any forms or screenshots you can share publicly below.

odk_svg_test.xlsx (638.5 KB)

I cannot attach the SVG file here but can share somewhere else on request. Format as follows:

<?xml version="1.0" encoding="utf-8"?>
<!-- (c) ammap.com | SVG map of Switzerland - High -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:amcharts="http://amcharts.com/ammap" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="640" height="480">
	<g id="outlines">
		<path id="AG" title="Aargau" d="M674.56,717.89l2.7,-1.86l3.8,-3.28l3.59,...,3.43L612.34,522.7z"/>
		<path id="AI" title="Appenzell Inner-Rhoden" d="M959.04,605.77l-0.32,..."/>
1 Like

Thanks @Thalie for reporting this. I was able to reproduce the issue in Chrome as well.

It seems like an issue in Enketo, I have created a bug in Enketo's GitHub repository https://github.com/enketo/enketo/issues/1312 to track this.

1 Like

@Thalie Has this feature worked in a previous version of Central? I'm trying to understand if it's a regression or not.

Hi @yanokwa, I have no idea, that was the first time I was testing this feature (sorry :smiling_face:)

1 Like