Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6898421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:17:39+00:00 2026-05-27T07:17:39+00:00

I am using menu_get_object() in my module hook_nodeapi function. Due to that code I

  • 0

I am using menu_get_object() in my module hook_nodeapi function. Due to that code I get the following error:

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection
without sending any data.

The code is as follows:

 function mymodule_nodeapi(&$node, $op, $a3, $a4){    
    $nodex = menu_get_object();
    drupal_set_message("Currnet Node(test) : {$nodex->nid}");
 }

How can I resolve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:17:39+00:00Added an answer on May 27, 2026 at 7:17 am

    I think it’s because $node is passed in by reference to the hook_nodeapi() function and you’re trying to re-assign it using menu_get_object().

    You should either use a different name for the second node you want to load, e.g.

    function mymodule_nodeapi(&$node, $op, $a3, $a4){    
      $other_node = menu_get_object();
      drupal_set_message("Currnet Node(test) : {$other_node->nid}");
    }
    

    Or, if you’re looking for the node to which the nodeapi function is referring to, just use the $node object passed into the function.

    UPDATE

    I think this will do what you’re trying to do:

    function mymodule_nodeapi(&$node, $op, $a3, $a4){ 
      // If this call to nodeapi is for the currently visited node page
      // $a3 contains a boolean indicating whether the view mode is teaser of full.
      if ($op == 'view' && !$a3) {
        drupal_set_message('Current Node : ' . $node->nid);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for the correct way of using wp_get_attachment_image(). The following code: <?php $args
I get the following error when I try to compile my C# program: The
Is there any way to get a dynamic menu for Asp.Net web application using
I'm trying to make a drop down menu using javascript/jquery but can't get my
What's the easiest/best way to register your program in explorers right-click menu using .NET
I am using notification to get control when menu items clicked... - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
I'm trying to figure out how to get the clicked element whey using $(document).click()
I am trying to generate an <object> tag only embed code and cannot get
I am using rowcontextmenu in radgrid. I did this using demos that provided by
I'm finding that in my application, the user can get quite 'nested' in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.