Problem with <conditionalContent> possibly connected to a <choiceInput>

I’m having difficulty trying to get choices to work where the one of the answers is an <integer> whose value is the result of a <conditionalContent> sequence.
See the code at:

This works great until you “Try new question” several times. Then it gives some variety of error like:

Error: Found a duplicate componentIdx: 623
Found on lines 333–337.

I’m not sure what I’m doing wrong here. Is this the wrong way to conditionally set an <integer> value? Or is this a bug?

If you see Found a duplicate componentIdx, that is a bug. I thought I fixed how conditional content can create that, but you must have found an new edge case. I am unable to get that error, even after pressing “Try new question” many times. Could you give me a deterministic algorithm for invoking that error so that I can troubleshoot it?

I was also unable to recreate the bug. @Steve_Frezza: any chance you need to clear your browser cache to get the newest version of DoenetML where the prior fix is in? I also had this same error on several of my activities prior to the recent version update.

Oh, right, loading an older version of DoenetML before I fixed this bug could explain it. In the lower left corner of the editor, it should say v0.7.23 if you are on the latest version.

This was very helpful - I was running 7.21, and it seems to be fine in 7.23.

Thank you again for the help, and all you do for this project.

1 Like