The 'mapping' of function parameters is working, but not the addition of the request data.

Using the example module:

function js_callback_examples_js_callback_get_uid($first_name) {
  print $first_name; // Works
}

Opposed to:

function js_callback_examples_js_callback_get_uid($not_a_request_param) {
  print $not_a_request_param; // NULL
}

This is also true in the multi-variable scenario, I've added a second parameter in the form:

function js_callback_examples_js_callback_get_uid($first_name, $not_a_request_param) {
  print $first_name; // works
  print $not_a_request_param; // NULL
}
CommentFileSizeAuthor
#2 request-data-2850893-2.patch699 bytesb_sharpe
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

b_sharpe created an issue. See original summary.

b_sharpe’s picture

Status: Active » Needs review
FileSize
699 bytes

Turns out its due to the parameter being set regardless if it exists in the $_REQUEST data. So when it get's merged into the access/callback args, it exists and gets mapped as NULL.

  • markcarver committed 0484752 on 7.x-2.x authored by b_sharpe
    Issue #2850893 by b_sharpe: Request data not being added to callback
    
markhalliwell’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

markhalliwell’s picture

This issue/commit is likely going to get reverted. After re-evaluating and re-reading this issue, I cannot deduce what the actual issue is/was. See #2892987-3: Breaking change in 7.x-2.3.

b_sharpe’s picture

IIRC, without this change the final $data argument had some issue in a certain scenario. If I get some time I'll revert and test.