- πΊπΈUnited States smustgrave
With D7 approaching EOL going to start triaging the D7 queue. If this gets reviewed before EOL will look to merge else will close out
When saving a Quiz Question that is currently used in one or more Quizzes, and the administrator has decided to create a new revision of that Question, a confirmation screen is displayed which asks what to do with the Quizes. The 3 options here are to update the Quiz, update and unpublish the Quiz, or do nothing.
The problem is that no matter what option is selected, the new revision of the Question is missing some of the altered data. A new revision is created, and some data is saved, but some is not.
The issue stems from the fact that when the Question node is saved, the QuizQuestion->save();
function is called which uses a custom save routine ($this->saveNodeProperties($is_new);
) and saves some but not all of the node data. At this point if we are not creating a new revision the function completes and the normal Drupal node save operations take place and all the data is saved.
If a new revision is being created then we are immediately redirected to the confirmation screen where we can choose what to do with the parent Quiz. The redirection exits the function immediately and prevents the normal Drupal node save from completing.
One of the fields which fails to save in this scenario is the node body. There will be others which may vary depending on the Question type.
The fix for this issue is to stop using drupal_goto
for the redirection, and override the destination parameter instead.
Additionally I altered the redirection destination to preserve any previous destination that may have been set. For example, if you edited the Question from the Manage Questions tab of a Quiz, after saving the question and choosing a Quiz update option, you will be redirected back to the Manage Questions tab.
Needs review
4.0
Code - Quiz core
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
With D7 approaching EOL going to start triaging the D7 queue. If this gets reviewed before EOL will look to merge else will close out