Got this warning

Warning: Missing argument 3 for exclude_node_title_node_view() in exclude_node_title_node_view() (line 79 of C:\xampp\htdocs\drupal7beta2\sites\all\modules\exclude_node_title\exclude_node_title.module).

Comments

gabrielu’s picture

Status: Active » Needs review

You have to replace the function definition in exclude_node_title.module:79 from:

function exclude_node_title_node_view($node, $view_mode, $langcode) {

to:

function exclude_node_title_node_view($node, $view_mode) {
gabrielu’s picture

Status: Needs review » Active

Maybe this isn't related to Exclude node title, as hook_node_view() should have all three arguments passed, see http://api.drupal.org/api/drupal/modules--node--node.api.php/function/ho...

gabrielu’s picture

Status: Active » Closed (works as designed)
rooby’s picture

Status: Closed (works as designed) » Active

I have run into this with porting the location module too.
It seems to doco is wrong and there are only 2 params.
If you look at the implementations of blog_node_view(), forum_node_view() etc they only have 2.

I opened a doco issue here - #1102556: hook_node_view (maybe) has only two arguments

gabrielu’s picture

Status: Active » Needs review

You are absolutely right, I must update the hook.
See latest DEV release.

Thanks,
Gabriel

gabrielu’s picture

Status: Needs review » Closed (fixed)

  • Commit 06dd265 on 7.x-1.x, 8.x-1.x by gabrielu:
    #1072208 removing 3'rd () parameter from hook_node_view()