I have quiz_question an diff enabled in a site, and I see these errors

Notice: Undefined index: #node en diff_node_view_alter() (línea 306 de diff/diff.module).
Notice: Trying to get property of non-object en diff_node_view_alter() (línea 307 de diff/diff.module).

I see that node_view in node.module ensures that the key exists in the the build array passed to drupal_alter, so maybe we should do the same before calling drupal_alter(array('node_view', 'entity_view'), ... in quiz_question_answering_form and QuizQuestionResponse::getFeedback.

CommentFileSizeAuthor
#2 undefined_index_node-2578631-2.patch1.95 KBmpv
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpv created an issue. See original summary.

mpv’s picture

Status: Active » Needs review
FileSize
1.95 KB

Here's a patch that ensures that '#node' and '#language' are defined before calling drupal_alter.

meramo’s picture

Status: Needs review » Reviewed & tested by the community

Confirm the issue. Thanks for the patch! I think it can go rtbc directly.

djdevin’s picture

Status: Reviewed & tested by the community » Closed (duplicate)