If a question is attached to a quiz and you edit it, saving a new revision in the process, during the node_save hook for the question, there is a drupal_goto that sends the user to the revision actions page for the quiz. This interrupts the node save process before fields can be saved. In my particular case, edits to the body field were never being saved to the database, while the revision was being saved to the node and node_revision tables. It appears that even though the db transaction never completes, there's no exception thrown either, so it doesn't get rolled back.
This leads to all sorts of weirdness - when a quiz attempts to load a revision that doesn't have a corresponding body field, you get a question that only shows answers and not the question itself.
In any case, taking the drupal_goto out of save() and making it a form redirect for the node edit form seems to take care of things. There might be a better way to target the form for all question types than what I've got here, though.
| Comment | File | Size | Author |
|---|---|---|---|
| quiz_question_revise_quiz.patch | 1.74 KB | delzhand |
Comments
Comment #1
falcon commentedOnly affects sites that has manual revisioning enabled.
Comment #2
djdevin