Since installing antispam I get this warning at the top of all my posts:

Warning: Missing argument 3 for antispam_node_view() in antispam_node_view() (line 917 of /f2/oolong/public/drupal/sites/all/modules/antispam/antispam.module).

I see that the function in question is function antispam_node_view($node, $view_mode, $langcode) so the missing argument is apparently $langcode - but why?

This may well be related to this issue with antispam_node_validate, which is also language-related, but I'm not sure so I prefer to err on the side of keeping them separate.

CommentFileSizeAuthor
#2 1780212-2.patch421 bytesJody Lynn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Oolong’s picture

I note that I also get the same bug for antispam_node_validate when I've just made a post (but it seems to disappear after that).

Jody Lynn’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
FileSize
421 bytes

Please test the following patch.

Jody Lynn’s picture

Status: Active » Needs review
tim.plunkett’s picture

Status: Needs review » Postponed (maintainer needs more info)

Looking at #1102556: hook_node_view (maybe) has only two arguments, it seems that this is not actually a bug, except in whatever is calling the code.

Try pasting the following into your antispam_node_view():

if (!isset($langcode)) {
  debug(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS));

And see paste it here.