To reproduce, edit a multichoice question. Make sure "Create new revision" is checked. After saving, any answers/choices that already existed before you edited it will disappear.
I fixed it by editing the multichoice_update() function in multichoice.module. When it loops through the answers, and it comes across one that has an answer_id set (meaning, apparently, that the answer already existed when the node was loaded), it'll only ever do a DELETE or an UPDATE, and never an INSERT. But an INSERT is exactly what you need when the vid of the question node changes.
I attached a patch that fixes it for me. It changes the foreach loop so that when it checks for an answer_id, it also makes sure $node->revision is empty. In addition, I modified the elseif so it won't insert anything where $value['delete'] isn't empty, since some of those can reach it now.
| Comment | File | Size | Author |
|---|---|---|---|
| multichoice.patch | 957 bytes | darktygur-1 |
Comments
Comment #1
eabrand commentedIt worked for me! Good Job!
Comment #2
mbutcher commentedThis patch was committed, and will be in Quiz 3.1. Thanks for the work!
Matt