Error message
Notice: Undefined index: body in contentanalysis_parse_context_node_load() (line 800 of C:\wamp\www\websites\development\sandbox\sites\all\modules\contentanalysis\contentanalysis.module).

This is displayed when clicking find content > insight

Comments

mixxmac’s picture

I get this error in a couple of scenarios:

1) Saving a node with an empty body field
2) Saving a node for a content type that doesn't use a body field

Notice: Undefined index: body in contentanalysis_parse_context_node_load() (line 800 of ... sites/all/modules/contentanalysis/contentanalysis.module).

devilworks’s picture

delete the code on line 800 will fix this error

$context['body'] = $node_view['body'][0]['#markup'];

paulgemini’s picture

Status: Active » Reviewed & tested by the community

Yeah that worked for me.

kingfisher64’s picture

Yep #2 works.

jawi’s picture

works for me

rvdtuin’s picture

Does the deleting of this piece of code effect any other part of the contentanalysis or any other functionality?

DrupalDan’s picture

sub

jmrivero’s picture

Fixed it by adding a conditional to check that the body key exists instead of deleting the line.

  if(array_key_exists('body',$node_view))
    $context['body'] = $node_view['body'][0]['#markup'];
gianfrasoft’s picture

Oops...! #8 didn't worked for me!

dmducc’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new647 bytes

I have created a patch that is similiar to #8.

<?php
  if(!empty($node_view['body'])) {
    $context['body'] = $node_view['body'][0]['#markup'];    
  }
?>

Followed the directions to to commit, but I dont see it yet.

kyletaylored’s picture

Status: Needs review » Patch (to be ported)

Patch looks great, will be committed in next release. Thanks dmduke!

makokis’s picture

Issue summary: View changes

this patch helps me, thanks

kyletaylored’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.