Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
}
Comment | File | Size | Author |
---|---|---|---|
#2 | request-data-2850893-2.patch | 699 bytes | b_sharpe |
Comments
Comment #2
b_sharpe CreditAttribution: b_sharpe at ImageX commentedTurns 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.
Comment #4
markhalliwellComment #6
markhalliwellThis 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.
Comment #7
b_sharpe CreditAttribution: b_sharpe at ImageX commentedIIRC, without this change the final $data argument had some issue in a certain scenario. If I get some time I'll revert and test.