Hi, thanks for the batch of recent fixes. There is however a major remaining issue, in that the content gathering work fine for comments but fails for nodes. It does expect a field_body, which might not be present (straight port from D6, I suppose). Nodes can be made of any type/numbers of fields and don't always have a body field. Even if they do, it can be named anything.
This is used in 2 places at least:

1.
antispam_prepare_comment_data()
One possible solution (actually, the only on I can think of) would be to use the rendered node as the content, similar to:

$entities = entity_load('node', [$content->nid]);
        $render = reset(entity_view('node', $entities));
        $rendered = drupal_html_to_text(drupal_render($render), 'a');
        $comment_data['comment-content'] = $rendered;

2.
antispam_moderation_form()
Getting rid of the JOIN enterly (and not showing an extract) might be sufficient, else using the same method than above would probably do.

An additional option might be to use a dedicated view mode for this, instead of the default one.

Thoughts ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bellesmanieres created an issue. See original summary.

vengador’s picture

We have a patch ready for this issue.

cfinke’s picture

Thanks for the patch; I've committed it in changeset 09b8c249.

cfinke’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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